Compares room messages by reference.

This commit is contained in:
Vitor Pamplona
2023-04-20 14:08:58 -04:00
parent 48f4fc4a0f
commit 0a15e079dc

View File

@@ -295,7 +295,7 @@ class User(val pubkeyHex: String) {
fun hasSentMessagesTo(user: User?): Boolean {
val messagesToUser = privateChatrooms[user] ?: return false
return messagesToUser.roomMessages.any { this == it.author }
return messagesToUser.roomMessages.any { this === it.author }
}
fun hasReport(loggedIn: User, type: ReportEvent.ReportType): Boolean {