Show (threadless) error notifications for UD decrypt failures.

This commit is contained in:
Matthew Chen 2018-10-16 11:00:38 -04:00
parent 10309faf53
commit 9d7c3afdaf

View file

@ -550,7 +550,9 @@ NSError *EnsureDecryptError(NSError *_Nullable error, NSString *fallbackErrorDes
if (envelope.source.length > 0) {
errorMessage = [TSErrorMessage corruptedMessageWithEnvelope:envelope withTransaction:transaction];
} else {
// TODO: Find another way to surface undecryptable UD messages to the user.
TSErrorMessage *errorMessage = [TSErrorMessage corruptedMessageInUnknownThread];
[SSKEnvironment.shared.notificationsManager notifyUserForThreadlessErrorMessage:errorMessage
transaction:transaction];
return;
}
}