Migrate local group to v2 if another member has migrated it

This commit is contained in:
AsamK 2020-12-12 11:14:36 +01:00
parent f6061f95de
commit c10910e466
7 changed files with 101 additions and 34 deletions

View file

@ -1,5 +1,6 @@
package org.asamk.signal;
import org.asamk.signal.manager.GroupUtils;
import org.asamk.signal.manager.Manager;
import org.asamk.signal.storage.contacts.ContactInfo;
import org.asamk.signal.storage.groups.GroupInfo;
@ -380,7 +381,7 @@ public class ReceiveMessageHandler implements Manager.ReceiveMessageHandler {
}
} else if (groupContext.getGroupV2().isPresent()) {
final SignalServiceGroupV2 groupInfo = groupContext.getGroupV2().get();
byte[] groupId = m.getGroupId(groupInfo.getMasterKey());
byte[] groupId = GroupUtils.getGroupId(groupInfo.getMasterKey());
System.out.println(" Id: " + Base64.encodeBytes(groupId));
GroupInfo group = m.getGroup(groupId);
if (group != null) {