code cleanup per code review

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent 4a73ab2851
commit 81d36a4652

@ -27,6 +27,8 @@ NSString *const TSStorageManagerTrustedKeysCollection = @"TSStorageManagerTruste
// Don't trust an identity for sending to unless they've been around for at least this long
const NSTimeInterval kIdentityKeyStoreNonBlockingSecondsThreshold = 5.0;
const NSUInteger kIdentityKeyLength = 32;
NSString *const kNSNotificationName_IdentityStateDidChange = @"kNSNotificationName_IdentityStateDidChange";
@interface OWSIdentityManager ()
@ -299,7 +301,7 @@ NSString *const kNSNotificationName_IdentityStateDidChange = @"kNSNotificationNa
- (BOOL)isTrustedKey:(NSData *)identityKey forSendingToIdentity:(nullable OWSRecipientIdentity *)recipientIdentity
{
OWSAssert(identityKey.length == 32);
OWSAssert(identityKey.length == kIdentityKeyLength);
@synchronized(self)
{
@ -308,7 +310,7 @@ NSString *const kNSNotificationName_IdentityStateDidChange = @"kNSNotificationNa
return YES;
}
OWSAssert(recipientIdentity.identityKey.length == 32);
OWSAssert(recipientIdentity.identityKey.length == kIdentityKeyLength);
if (![recipientIdentity.identityKey isEqualToData:identityKey]) {
DDLogWarn(@"%@ key mismatch for recipient: %@", self.tag, recipientIdentity.recipientId);
return NO;

@ -202,7 +202,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (NSString *)descriptionForSyncMessage:(OWSSignalServiceProtosSyncMessage *)syncMessage
{
NSMutableString *description = [[NSMutableString alloc] initWithString:@""];
NSMutableString *description = [NSMutableString new];
if (syncMessage.hasSent) {
[description appendString:@"SentTranscript"];
} else if (syncMessage.hasRequest) {

Loading…
Cancel
Save