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
/// 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.
///

@ -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];

@ -1155,7 +1155,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