Send expiration timer updates again
This commit is contained in:
parent
4942da1d23
commit
c4e0b45b33
|
@ -866,9 +866,7 @@ static CGRect oldframe;
|
|||
if (self.disappearingMessagesConfiguration.dictionaryValueDidChange) {
|
||||
[LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
|
||||
[self.disappearingMessagesConfiguration saveWithTransaction:transaction];
|
||||
// MJK TODO - should be safe to remove this senderTimestamp
|
||||
OWSDisappearingConfigurationUpdateInfoMessage *infoMessage =
|
||||
[[OWSDisappearingConfigurationUpdateInfoMessage alloc]
|
||||
OWSDisappearingConfigurationUpdateInfoMessage *infoMessage = [[OWSDisappearingConfigurationUpdateInfoMessage alloc]
|
||||
initWithTimestamp:[NSDate ows_millisecondTimeStamp]
|
||||
thread:self.thread
|
||||
configuration:self.disappearingMessagesConfiguration
|
||||
|
@ -876,15 +874,9 @@ static CGRect oldframe;
|
|||
createdInExistingGroup:NO];
|
||||
[infoMessage saveWithTransaction:transaction];
|
||||
|
||||
// TODO TODO TODO
|
||||
|
||||
/*
|
||||
OWSDisappearingMessagesConfigurationMessage *message = [[OWSDisappearingMessagesConfigurationMessage alloc]
|
||||
initWithConfiguration:self.disappearingMessagesConfiguration
|
||||
thread:self.thread];
|
||||
|
||||
[self.messageSenderJobQueue addMessage:message transaction:transaction];
|
||||
*/
|
||||
SNExpirationTimerUpdate *expirationTimerUpdate = [SNExpirationTimerUpdate new];
|
||||
expirationTimerUpdate.duration = self.disappearingMessagesConfiguration.durationSeconds;
|
||||
[SNMessageSender send:expirationTimerUpdate withAttachments:@[] inThread:self.thread usingTransaction:transaction];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ public final class ExpirationTimerUpdate : ControlMessage {
|
|||
public var duration: UInt32?
|
||||
|
||||
// MARK: Initialization
|
||||
public override init() { super.init() }
|
||||
|
||||
internal init(duration: UInt32) {
|
||||
super.init()
|
||||
self.duration = duration
|
||||
|
@ -53,4 +55,9 @@ public final class ExpirationTimerUpdate : ControlMessage {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Convenience
|
||||
@objc public func setDuration(_ duration: UInt32) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue