Respond to CR.

pull/2/head
Matthew Chen 6 years ago
parent 6ef65ad9d6
commit 5f0de5c36d

@ -804,7 +804,8 @@ NSString *NSStringForOutgoingMessageRecipientState(OWSOutgoingMessageRecipientSt
// b) "Sent updates" should never downgrade the "recipient state" for any // b) "Sent updates" should never downgrade the "recipient state" for any
// recipients. Prefer existing "recipient state"; "sent updates" only // recipients. Prefer existing "recipient state"; "sent updates" only
// add new recipients at the "sent" state. // add new recipients at the "sent" state.
[recipientStateMap removeObjectsForKeys:self.recipientStateMap.allKeys]; //
// Therefore we retain all existing entries in the recipient state map.
[recipientStateMap addEntriesFromDictionary:self.recipientStateMap]; [recipientStateMap addEntriesFromDictionary:self.recipientStateMap];
} }

@ -1391,19 +1391,12 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
return success(); return success();
} }
BOOL shouldSendTranscript = NO; BOOL shouldSendTranscript = (AreRecipientUpdatesEnabled() || !message.hasSyncedTranscript);
BOOL isRecipientUpdate = NO;
if (message.hasSyncedTranscript) {
shouldSendTranscript = YES;
} else if (AreRecipientUpdatesEnabled()) {
shouldSendTranscript = YES;
isRecipientUpdate = YES;
}
if (!shouldSendTranscript) { if (!shouldSendTranscript) {
return success(); return success();
} }
BOOL isRecipientUpdate = message.hasSyncedTranscript;
[self [self
sendSyncTranscriptForMessage:message sendSyncTranscriptForMessage:message
isRecipientUpdate:isRecipientUpdate isRecipientUpdate:isRecipientUpdate

Loading…
Cancel
Save