Fix incorrect ttl.

pull/20/head
Mikunj 6 years ago
parent 0566d94105
commit 80911787e6

@ -7,7 +7,7 @@ public extension LokiAPI {
let destination: String
/// The content of the message.
let data: LosslessStringConvertible
/// The time to live for the message in seconds.
/// The time to live for the message in milliseconds.
let ttl: UInt64
/// When the proof of work was calculated, if applicable.
///

@ -48,7 +48,7 @@
- (uint)ttl {
// Address messages should only last 1 minute
return 1 * kMinuteInterval;
return 1 * kMinuteInMs;
}
@end

@ -8,7 +8,7 @@
- (BOOL)isFriendRequest { return YES; }
- (uint)ttl { return 4 * kDayInterval; } // Friend requests should stay for the longest on the storage server
- (uint)ttl { return 4 * kDayInMs; } // Friend requests should stay for the longest on the storage server
- (SSKProtoContentBuilder *)contentBuilder:(SignalRecipient *)recipient {
SSKProtoContentBuilder *contentBuilder = [super contentBuilder:recipient];

@ -1157,7 +1157,7 @@ NSString *NSStringForOutgoingMessageRecipientState(OWSOutgoingMessageRecipientSt
- (uint)ttl {
// Time to live for all messages (except friend request messages) should be 1 day
// TODO: Change this to return a value that the user chose
return 1 * kDayInterval;
return 1 * kDayInMs;
}
@end

Loading…
Cancel
Save