Merge pull request #9 from loki-project/messaging-refactor

Minor Refactoring
pull/10/head
Niels Andriesse 7 years ago committed by GitHub
commit f0566d2b05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
Subproject commit d9384a2ca180cf0f47b984b38202f0f710d47bd4
Subproject commit 56186c3b395dffd12fc22b675461720dd5a67059

@ -0,0 +1,2 @@
public typealias JSON = [String:String]

@ -42,7 +42,7 @@ public struct LokiMessage {
}
}
public func toJSON() -> [String:String] {
public func toJSON() -> JSON {
var result = [ "destination" : destination, "data" : data.description, "ttl" : String(ttl) ]
if let timestamp = timestamp, let nonce = nonce {
result["timestamp"] = String(timestamp)

@ -1495,7 +1495,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
// Loki: Since we don't support multi-device sending yet, just send it to the primary device
NSMutableArray<NSNumber *> *deviceIds = [NSMutableArray arrayWithObject:@(OWSDevicePrimaryDeviceId)];
/* Original code:
/* Loki: Original code:
NSMutableArray<NSNumber *> *deviceIds = [recipient.devices mutableCopy];
*/

Loading…
Cancel
Save