krgamestudios / MERN-template

A website template using the MERN stack. It is geared towards Persistent Browser Based Games (think neopets), but is flexible enough for a number of different uses.
zlib License
68 stars 9 forks source link

[Suggestion] Add timestamps to chat messages #21

Closed Kylogias closed 2 years ago

Kylogias commented 2 years ago

Timestamps should be added to chat messages. Imagine this scenario: Someone has a conversation at 2 AM your time. Since you can't see the timestamp, you assume the conversation is still going so you continue it even though it's long dead. Timestamps would help fix this scenario

Ratstail91 commented 2 years ago

This would be good - although the chatbox is a bit small for them. Maybe we could optionally expand it to the left?

Sequelize adds in a "createdAt" field which could be used for this. Actually, I'm not certain but I think this field even reaches the client-side when the message is broadcasted. So this would simply be a front-end tweak.

Ratstail91 commented 2 years ago

Completed: https://github.com/krgamestudios/MERN-template/commit/14a3c9eabe2a962912af5eeb3ea686726c9f1b72