The way Chats are stored in Pleroma’s DB is kinda interesting. Each message has an entry in the Objects table, as well as two “message reference” entries, one entry for each user viewing the message. This allows each user to have their own view of the chat. This way each message can be “read” or “unread” for that user, and the user can even delete the other user’s messages… but it only disappears for you.

Follow

@alex Oh god this is exactly how a messaging app I was working on stores messages. The backend was such a pain

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.