handle sync message of closed groups

pull/104/head
Ryan ZHAO 5 years ago
parent b5ce94c6ab
commit 9e1681558e

@ -1108,6 +1108,11 @@ NS_ASSUME_NONNULL_BEGIN
NSData *data = syncMessage.groups.data;
// TODO: decode the data and handle the group info
GroupParser *parser = [[GroupParser alloc] initWithData:data];
NSArray<TSGroupModel *> *groupModels = [parser parseGroupModels];
for (TSGroupModel *groupModel in groupModels) {
TSGroupThread *thread = [TSGroupThread getOrCreateThreadWithGroupModel:groupModel];
[self establishSessionsWithMembersIfNeeded:groupModel.groupMemberIds forThread:thread transaction:transaction];
}
}
} else {
OWSLogWarn(@"Ignoring unsupported sync message.");

Loading…
Cancel
Save