mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
cleanup logging
// FREEBIE
This commit is contained in:
parent
55d0db8c46
commit
d71b7684a6
|
@ -17,7 +17,6 @@
|
|||
#import <SignalServiceKit/TSCall.h>
|
||||
#import <SignalServiceKit/TSInvalidIdentityKeyReceivingErrorMessage.h>
|
||||
#import <SignalServiceKit/TSStorageManager+SessionStore.h>
|
||||
#import <SignalServiceKit/OWSProfileKeyMessage.h>
|
||||
#import <SignalServiceKit/TSThread.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
|
|
@ -844,15 +844,17 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
{
|
||||
NSString *recipientId = incomingEnvelope.source;
|
||||
if (!dataMessage.hasProfileKey) {
|
||||
OWSFail(@"%@ received profile key message without profile key from recipient: %@", self.tag, recipientId);
|
||||
OWSFail(@"%@ received profile key message without profile key from: %@",
|
||||
self.tag,
|
||||
envelopeAddress(incomingEnvelope));
|
||||
return;
|
||||
}
|
||||
NSData *profileKey = dataMessage.profileKey;
|
||||
if (profileKey.length != kAES256_KeyByteLength) {
|
||||
OWSFail(@"%@ received profile key of unexpected length:%lu from recipient: %@",
|
||||
OWSFail(@"%@ received profile key of unexpected length:%lu from:%@",
|
||||
self.tag,
|
||||
(unsigned long)profileKey.length,
|
||||
recipientId);
|
||||
envelopeAddress(incomingEnvelope));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1001,12 +1003,18 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
break;
|
||||
}
|
||||
case OWSSignalServiceProtosGroupContextTypeDeliver: {
|
||||
DDLogDebug(@"%@ incoming message from: %@ for group: %@ with timestampe: %lu",
|
||||
self.tag,
|
||||
envelopeAddress(envelope),
|
||||
groupId,
|
||||
(unsigned long)timestamp);
|
||||
if (body.length > 0) {
|
||||
if (body.length == 0) {
|
||||
DDLogWarn(@"%@ ignoring empty incoming message from: %@ for group: %@ with timestampe: %lu",
|
||||
self.tag,
|
||||
envelopeAddress(envelope),
|
||||
groupId,
|
||||
(unsigned long)timestamp);
|
||||
} else {
|
||||
DDLogDebug(@"%@ incoming message from: %@ for group: %@ with timestampe: %lu",
|
||||
self.tag,
|
||||
envelopeAddress(envelope),
|
||||
groupId,
|
||||
(unsigned long)timestamp);
|
||||
incomingMessage = [[TSIncomingMessage alloc] initWithTimestamp:timestamp
|
||||
inThread:gThread
|
||||
authorId:envelope.source
|
||||
|
@ -1026,11 +1034,16 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
thread = gThread;
|
||||
} else {
|
||||
DDLogDebug(@"%@ incoming message from: %@ with timestampe: %lu",
|
||||
self.tag,
|
||||
envelopeAddress(envelope),
|
||||
(unsigned long)timestamp);
|
||||
if (body.length > 0) {
|
||||
if (body.length == 0) {
|
||||
DDLogWarn(@"%@ ignoring empty incoming message from: %@ with timestampe: %lu",
|
||||
self.tag,
|
||||
envelopeAddress(envelope),
|
||||
(unsigned long)timestamp);
|
||||
} else {
|
||||
DDLogDebug(@"%@ incoming message from: %@ with timestampe: %lu",
|
||||
self.tag,
|
||||
envelopeAddress(envelope),
|
||||
(unsigned long)timestamp);
|
||||
TSContactThread *cThread = [TSContactThread getOrCreateThreadWithContactId:envelope.source
|
||||
transaction:transaction
|
||||
relay:envelope.relay];
|
||||
|
|
Loading…
Reference in a new issue