mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-17 13:38:26 +00:00
fix: don't delete group as admin if only one user left
This commit is contained in:
parent
65b36c006c
commit
5db46325a5
@ -518,7 +518,7 @@ object ClosedGroupsProtocolV2 {
|
||||
val userLeft = userPublicKey == senderPublicKey
|
||||
|
||||
// if the admin left, we left, or we are the only remaining member: remove the group
|
||||
if (didAdminLeave || userLeft || updatedMemberList.size == 1) {
|
||||
if (didAdminLeave || userLeft) {
|
||||
disableLocalGroupAndUnsubscribe(context, apiDB, groupPublicKey, groupDB, groupID, userPublicKey)
|
||||
} else {
|
||||
val isCurrentUserAdmin = admins.contains(userPublicKey)
|
||||
|
Loading…
x
Reference in New Issue
Block a user