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

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

Loading…
Cancel
Save