Fix ttl not being in milliseconds.

pull/26/head
Mikunj 7 years ago
parent ab06a1362e
commit f084c804c5

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

@ -8,7 +8,7 @@
- (BOOL)isFriendRequest { return YES; } - (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:(SignalRecipient *)recipient {
SSKProtoContentBuilder *contentBuilder = [super contentBuilder:recipient]; SSKProtoContentBuilder *contentBuilder = [super contentBuilder:recipient];

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

Loading…
Cancel
Save