mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-16 10:41:25 +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
|
val userLeft = userPublicKey == senderPublicKey
|
||||||
|
|
||||||
// if the admin left, we left, or we are the only remaining member: remove the group
|
// 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)
|
disableLocalGroupAndUnsubscribe(context, apiDB, groupPublicKey, groupDB, groupID, userPublicKey)
|
||||||
} else {
|
} else {
|
||||||
val isCurrentUserAdmin = admins.contains(userPublicKey)
|
val isCurrentUserAdmin = admins.contains(userPublicKey)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user