mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
handle the case when an added member is a zombie
This commit is contained in:
parent
bfa75a3db9
commit
9399da6bad
@ -395,6 +395,11 @@ private fun MessageReceiver.handleClosedGroupMembersAdded(message: ClosedGroupCo
|
||||
val newMembers = members + updateMembers
|
||||
storage.updateMembers(groupID, newMembers.map { Address.fromSerialized(it) })
|
||||
|
||||
// update zombie members in case the added members are zombies
|
||||
val zombies = storage.getZombieMember(groupID)
|
||||
if (zombies.intersect(updateMembers).isNotEmpty())
|
||||
storage.updateZombieMembers(groupID, zombies.minus(updateMembers).map { Address.fromSerialized(it) })
|
||||
|
||||
// Notify the user
|
||||
if (userPublicKey == senderPublicKey) {
|
||||
// sender is a linked device
|
||||
|
Loading…
Reference in New Issue
Block a user