fix: don't delete group as admin if only one user left

This commit is contained in:
jubb 2021-02-22 13:51:48 +11:00
parent 65b36c006c
commit 5db46325a5

View File

@ -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)