mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
fix to avoid zombies to be cleared when new group update received
This commit is contained in:
parent
6fb461f7d8
commit
1d0b61cf89
@ -294,7 +294,6 @@ public class GroupDatabase extends Database implements LokiOpenGroupDatabaseProt
|
||||
|
||||
ContentValues contents = new ContentValues();
|
||||
contents.put(ZOMBIE_MEMBERS, Address.toSerializedList(members, ','));
|
||||
contents.put(ACTIVE, 1);
|
||||
databaseHelper.getWritableDatabase().update(TABLE_NAME, contents, GROUP_ID + " = ?",
|
||||
new String[] {groupId});
|
||||
}
|
||||
|
@ -266,9 +266,11 @@ private fun handleNewClosedGroup(sender: String, sentTimestamp: Long, groupPubli
|
||||
val groupID = GroupUtil.doubleEncodeGroupID(groupPublicKey)
|
||||
if (storage.getGroup(groupID) != null) {
|
||||
// Update the group
|
||||
// clearing zombie list if the group was not active before the update is received
|
||||
if (!storage.isGroupActive(groupID))
|
||||
storage.setZombieMembers(groupID, listOf<String>().map { Address.fromSerialized(it) })
|
||||
storage.updateTitle(groupID, name)
|
||||
storage.updateMembers(groupID, members.map { Address.fromSerialized(it) })
|
||||
storage.setZombieMembers(groupID, listOf<String>().map { Address.fromSerialized(it) })
|
||||
} else {
|
||||
storage.createGroup(groupID, name, LinkedList(members.map { Address.fromSerialized(it) }),
|
||||
null, null, LinkedList(admins.map { Address.fromSerialized(it) }), formationTimestamp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user