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) {
|
if (self.disappearingMessagesConfiguration.dictionaryValueDidChange) {
|
||||||
[LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
|
[LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
|
||||||
[self.disappearingMessagesConfiguration saveWithTransaction: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]
|
initWithTimestamp:[NSDate ows_millisecondTimeStamp]
|
||||||
thread:self.thread
|
thread:self.thread
|
||||||
configuration:self.disappearingMessagesConfiguration
|
configuration:self.disappearingMessagesConfiguration
|
||||||
|
@ -876,15 +874,9 @@ static CGRect oldframe;
|
||||||
createdInExistingGroup:NO];
|
createdInExistingGroup:NO];
|
||||||
[infoMessage saveWithTransaction:transaction];
|
[infoMessage saveWithTransaction:transaction];
|
||||||
|
|
||||||
// TODO TODO TODO
|
SNExpirationTimerUpdate *expirationTimerUpdate = [SNExpirationTimerUpdate new];
|
||||||
|
expirationTimerUpdate.duration = self.disappearingMessagesConfiguration.durationSeconds;
|
||||||
/*
|
[SNMessageSender send:expirationTimerUpdate withAttachments:@[] inThread:self.thread usingTransaction:transaction];
|
||||||
OWSDisappearingMessagesConfigurationMessage *message = [[OWSDisappearingMessagesConfigurationMessage alloc]
|
|
||||||
initWithConfiguration:self.disappearingMessagesConfiguration
|
|
||||||
thread:self.thread];
|
|
||||||
|
|
||||||
[self.messageSenderJobQueue addMessage:message transaction:transaction];
|
|
||||||
*/
|
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,8 @@ public final class ExpirationTimerUpdate : ControlMessage {
|
||||||
public var duration: UInt32?
|
public var duration: UInt32?
|
||||||
|
|
||||||
// MARK: Initialization
|
// MARK: Initialization
|
||||||
|
public override init() { super.init() }
|
||||||
|
|
||||||
internal init(duration: UInt32) {
|
internal init(duration: UInt32) {
|
||||||
super.init()
|
super.init()
|
||||||
self.duration = duration
|
self.duration = duration
|
||||||
|
@ -53,4 +55,9 @@ public final class ExpirationTimerUpdate : ControlMessage {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: Convenience
|
||||||
|
@objc public func setDuration(_ duration: UInt32) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue