Ignore messages from left groups

This commit is contained in:
Michael Kirk 2018-09-12 16:06:21 -05:00
parent b369ffa88f
commit f1e5b1862f
1 changed files with 8 additions and 1 deletions

View File

@ -398,7 +398,14 @@ NS_ASSUME_NONNULL_BEGIN
TSGroupThread *_Nullable groupThread =
[TSGroupThread threadWithGroupId:dataMessage.group.id transaction:transaction];
if (!groupThread) {
if (groupThread) {
if (dataMessage.group.type != SSKProtoGroupContextTypeUpdate) {
if (![groupThread.recipientIdentifiers containsObject:[TSAccountManager localNumber]]) {
DDLogInfo(@"%@ Ignoring messages for left group.", self.logTag);
return;
}
}
} else {
// Unknown group.
if (dataMessage.group.type == SSKProtoGroupContextTypeUpdate) {
// Accept group updates for unknown groups.