Create & access groups more carefully.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 380ed0f82b
commit 2a5a0929e6

@ -461,7 +461,7 @@ NS_ASSUME_NONNULL_BEGIN
TSGroupThread *_Nullable groupThread = TSGroupThread *_Nullable groupThread =
[TSGroupThread threadWithGroupId:dataMessage.group.id transaction:transaction]; [TSGroupThread threadWithGroupId:dataMessage.group.id transaction:transaction];
if (!groupThread) { if (!groupThread) {
[self sendGroupInfoRequest:dataMessage.group.id envelope:envelope transaction:transaction]; OWSFail(@"%@ Missing group for group avatar update", self.tag);
return; return;
} }
@ -585,7 +585,7 @@ NS_ASSUME_NONNULL_BEGIN
TSGroupThread *_Nullable groupThread = TSGroupThread *_Nullable groupThread =
[TSGroupThread threadWithGroupId:dataMessage.group.id transaction:transaction]; [TSGroupThread threadWithGroupId:dataMessage.group.id transaction:transaction];
if (!groupThread) { if (!groupThread) {
[self sendGroupInfoRequest:dataMessage.group.id envelope:envelope transaction:transaction]; OWSFail(@"%@ ignoring sync group avatar update for unknown group.", self.tag);
return; return;
} }
@ -915,8 +915,7 @@ NS_ASSUME_NONNULL_BEGIN
} }
case OWSSignalServiceProtosGroupContextTypeDeliver: { case OWSSignalServiceProtosGroupContextTypeDeliver: {
if (!oldGroupThread) { if (!oldGroupThread) {
DDLogInfo(@"%@ ignoring quit group message from unknown group.", self.tag); OWSFail(@"%@ ignoring quit group message from unknown group.", self.tag);
[self sendGroupInfoRequest:groupId envelope:envelope transaction:transaction];
return nil; return nil;
} }

Loading…
Cancel
Save