Minor clean up.

// FREEBIE
pull/1/head
Matthew Chen 9 years ago
parent f40629ffa0
commit 958dbd199b

@ -1,5 +1,6 @@
// Created by Frederic Jacobs on 15/11/14. //
// Copyright (c) 2014 Open Whisper Systems. All rights reserved. // Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "TSMessage.h" #import "TSMessage.h"
@ -16,8 +17,7 @@ typedef NS_ENUM(NSInteger, TSInfoMessageType) {
TSInfoMessageTypeDisappearingMessagesUpdate TSInfoMessageTypeDisappearingMessagesUpdate
}; };
+ (instancetype)userNotRegisteredMessageInThread:(TSThread *)thread + (instancetype)userNotRegisteredMessageInThread:(TSThread *)thread;
transaction:(YapDatabaseReadWriteTransaction *)transaction;
@property TSInfoMessageType messageType; @property TSInfoMessageType messageType;
@property NSString *customMessage; @property NSString *customMessage;

@ -1,5 +1,6 @@
// Created by Frederic Jacobs on 15/11/14. //
// Copyright (c) 2014 Open Whisper Systems. All rights reserved. // Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "NSDate+millisecondTimeStamp.h" #import "NSDate+millisecondTimeStamp.h"
#import "TSInfoMessage.h" #import "TSInfoMessage.h"
@ -44,8 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
return self; return self;
} }
+ (instancetype)userNotRegisteredMessageInThread:(TSThread *)thread + (instancetype)userNotRegisteredMessageInThread:(TSThread *)thread {
transaction:(YapDatabaseReadWriteTransaction *)transaction {
return [[self alloc] initWithTimestamp:[NSDate ows_millisecondTimeStamp] return [[self alloc] initWithTimestamp:[NSDate ows_millisecondTimeStamp]
inThread:thread inThread:thread
messageType:TSInfoMessageUserNotRegistered]; messageType:TSInfoMessageUserNotRegistered];

@ -399,7 +399,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
{ {
[self.dbConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) { [self.dbConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[recipient removeWithTransaction:transaction]; [recipient removeWithTransaction:transaction];
[[TSInfoMessage userNotRegisteredMessageInThread:thread transaction:transaction] [[TSInfoMessage userNotRegisteredMessageInThread:thread]
saveWithTransaction:transaction]; saveWithTransaction:transaction];
}]; }];
} }

Loading…
Cancel
Save