foundersandcoders / Live-Peers

2 stars 2 forks source link

Previous messages in room #32

Open jbesraa opened 7 years ago

jbesraa commented 7 years ago

when new user enters a room, he should see the history of the room(previous messages in the room)

njsfield commented 7 years ago

Good shout, this would require the server comms module storing all msgs passed in, and then dispatching them to a new client when they are registered

peterw8102 commented 7 years ago

Give every message into a room a unique sequence number starting from 1. In future this will allow your application to say 'the last message I saw was 1234, send me anything newer' - which in turn will be useful when a client loses it's web socket connect and has to restart. it will also allow the client to de-dupe messages if there's ever a possibility of a message being sent twice.