Fixing missing messages on chat

This commit is contained in:
Vitor Pamplona 2023-03-16 16:31:42 -04:00
parent f8b6b8fb45
commit fb0a7b0ae4

View File

@ -189,6 +189,7 @@ class User(val pubkeyHex: String) {
}
}
@Synchronized
fun addMessage(user: User, msg: Note) {
val privateChatroom = getOrCreatePrivateChatroom(user)
if (msg !in privateChatroom.roomMessages) {
@ -197,6 +198,7 @@ class User(val pubkeyHex: String) {
}
}
@Synchronized
fun removeMessage(user: User, msg: Note) {
val privateChatroom = getOrCreatePrivateChatroom(user)
if (msg in privateChatroom.roomMessages) {