MovieNight icon indicating copy to clipboard operation
MovieNight copied to clipboard

Add Scrollback for joining users.

Open zorchenhimer opened this issue 5 years ago • 4 comments

Add a scrollback with the last N messages in chat to send to joining users. The number of messages should be configurable.

zorchenhimer avatar Oct 24 '20 22:10 zorchenhimer

Yep, seems to be an good idea. Did you already though of a solution to keep the last N messages ?

  • Maybe an in ram rolling stack ?

zorglube avatar May 12 '21 17:05 zorglube

if i understand correctly a chat message is defined here: https://github.com/zorchenhimer/MovieNight/blob/9ba472bb5b26b8849b3fe44580f601a01cd8526a/common/chatdata.go#L86 Therefore it should be rather easy to implement a rolling stack with a fixed length to enable scrollback.

CptPie avatar May 12 '21 19:05 CptPie

I bet the 'bigest' problem isn't the stack but handling the new chat user and send just to him the stack content.

zorglube avatar May 12 '21 19:05 zorglube

Nah, that should be pretty straight forward. A bunch of (hidden) messages are already sent to the client during the join process. Sending the scrollback would just happen after all that. I suppose it could be a new hidden message type so it could be formatted differently or something (eg, greyed out), but that's not exactly necessary.

zorchenhimer avatar May 13 '21 14:05 zorchenhimer