Report info message type for timer duration changes

// FREEBIE
pull/1/head
Michael Kirk 9 years ago
parent 8fed13f9bb
commit 23854dc72d

@ -21,14 +21,13 @@ NS_ASSUME_NONNULL_BEGIN
configuration:(OWSDisappearingMessagesConfiguration *)configuration configuration:(OWSDisappearingMessagesConfiguration *)configuration
createdByRemoteName:(NSString *)name createdByRemoteName:(NSString *)name
{ {
self = [super initWithTimestamp:timestamp inThread:thread]; self = [self initWithTimestamp:timestamp thread:thread configuration:configuration];
if (!self) { if (!self) {
return self; return self;
} }
_createdByRemoteName = name; _createdByRemoteName = name;
_configurationIsEnabled = configuration.isEnabled;
_configurationDurationSeconds = configuration.durationSeconds;
return self; return self;
} }
@ -37,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
thread:(TSThread *)thread thread:(TSThread *)thread
configuration:(OWSDisappearingMessagesConfiguration *)configuration configuration:(OWSDisappearingMessagesConfiguration *)configuration
{ {
self = [super initWithTimestamp:timestamp inThread:thread]; self = [super initWithTimestamp:timestamp inThread:thread messageType:TSInfoMessageTypeDisappearingMessagesUpdate];
if (!self) { if (!self) {
return self; return self;
} }
@ -48,7 +47,6 @@ NS_ASSUME_NONNULL_BEGIN
return self; return self;
} }
- (NSString *)description - (NSString *)description
{ {
if (self.createdByRemoteName) { if (self.createdByRemoteName) {

@ -15,7 +15,8 @@ typedef NS_ENUM(NSInteger, TSInfoMessageType) {
TSInfoMessageUserNotRegistered, TSInfoMessageUserNotRegistered,
TSInfoMessageTypeUnsupportedMessage, TSInfoMessageTypeUnsupportedMessage,
TSInfoMessageTypeGroupUpdate, TSInfoMessageTypeGroupUpdate,
TSInfoMessageTypeGroupQuit TSInfoMessageTypeGroupQuit,
TSInfoMessageTypeDisappearingMessagesUpdate
}; };
+ (instancetype)userNotRegisteredMessageInThread:(TSThread *)thread + (instancetype)userNotRegisteredMessageInThread:(TSThread *)thread
@ -26,10 +27,11 @@ typedef NS_ENUM(NSInteger, TSInfoMessageType) {
- (instancetype)initWithTimestamp:(uint64_t)timestamp - (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(TSThread *)contact inThread:(TSThread *)contact
messageType:(TSInfoMessageType)infoMessage; messageType:(TSInfoMessageType)infoMessage NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithTimestamp:(uint64_t)timestamp - (instancetype)initWithTimestamp:(uint64_t)timestamp
inThread:(TSThread *)thread inThread:(TSThread *)thread
messageType:(TSInfoMessageType)infoMessage messageType:(TSInfoMessageType)infoMessage
customMessage:(NSString *)customMessage; customMessage:(NSString *)customMessage NS_DESIGNATED_INITIALIZER;
@end @end

Loading…
Cancel
Save