Clear messages if user is kicked

This commit is contained in:
SessionHero01 2024-10-30 14:48:34 +11:00
parent 2b0e8a966a
commit 83189ce717
No known key found for this signature in database

View File

@ -813,6 +813,13 @@ class GroupManagerV2Impl @Inject constructor(
) )
} }
// Clear all messages we have from the group
val threadId = storage.getThreadId(Address.fromSerialized(groupId.hexString))
if (threadId != null) {
storage.clearMessages(threadId)
}
// Insert a message to indicate we were kicked
storage.insertIncomingInfoMessage( storage.insertIncomingInfoMessage(
context = application, context = application,
senderPublicKey = userId, senderPublicKey = userId,