mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Refine asserts around message sending.
This commit is contained in:
parent
a6cef1c4cc
commit
c183aeca8e
1 changed files with 11 additions and 0 deletions
|
@ -1053,6 +1053,17 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
|
|||
}
|
||||
}
|
||||
|
||||
for (NSDictionary *deviceMessage in deviceMessages) {
|
||||
NSNumber *_Nullable messageType = deviceMessage[@"type"];
|
||||
OWSAssertDebug(messageType);
|
||||
if (messageSend.isUDSend) {
|
||||
OWSAssertDebug([messageType isEqualToNumber:@(TSUnidentifiedSenderMessageType)]);
|
||||
} else {
|
||||
OWSAssertDebug([messageType isEqualToNumber:@(TSEncryptedWhisperMessageType)] ||
|
||||
[messageType isEqualToNumber:@(TSPreKeyWhisperMessageType)]);
|
||||
}
|
||||
}
|
||||
|
||||
if (deviceMessages.count == 0) {
|
||||
// This might happen:
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue