Where is the chat messages stored?
-
They are stored in rooms, and each user has their own list of message ids. So if you have the
roomId
and auid
then you can get the list of message ids from the sorted set'uid:' + uid + ':chat:room:' + roomId + ':mids'
This sorted set contains message ids, to get the actual message data you need to load them frommessage:<mid>
. -
@whimpers If you get the entire message object it should have a
fromuid
field, using that id you can get the user object atuser:<uid>
everyone in the room receives the message, you can get the users in the room fromchat:room:<roomId>:uids
Copyright © 2024 NodeBB | Contributors