pull/26/head
Niels Andriesse 5 years ago
parent 96c02864c8
commit 33a5e59415

@ -320,7 +320,11 @@ static NSTimeInterval launchStartedAt;
if (self.lokiP2PServer.isRunning) { break; }
BOOL isStarted = [self.lokiP2PServer startOnPort:port.unsignedIntegerValue];
if (isStarted) {
OWSLogInfo(@"[Loki] Started server at \"%@\".", self.lokiP2PServer.serverURL);
NSString *serverURL = self.lokiP2PServer.serverURL.absoluteString;
if ([serverURL hasSuffix:@"/"]) {
serverURL = [serverURL substringToIndex:serverURL.length - 1];
}
OWSLogInfo(@"[Loki] Started server at %@.", serverURL);
break;
}
}

@ -31,7 +31,7 @@ public extension LokiAPI {
// MARK: Internal API
private static func getRandomSnode() -> Promise<Target> {
return Promise<Target> { seal in
seal.fulfill(Target(address: "http://13.236.173.190", port: 8080)) // TODO: For debugging purposes
seal.fulfill(Target(address: "http://13.236.173.190", port: defaultSnodePort)) // TODO: For debugging purposes
}
}
@ -73,7 +73,7 @@ internal extension Promise {
switch error.statusCode {
case 0:
// The snode is unreachable; usually a problem with LokiNet
Logger.warn("[Loki] There appears to be a problem with LokiNet.")
Logger.warn("[Loki] Couldn't reach snode at: \(target.address):\(target.port).")
case 421:
// The snode isn't associated with the given public key anymore
Logger.warn("[Loki] Invalidating swarm for: \(hexEncodedPublicKey).")

@ -52,7 +52,7 @@ public enum LokiMessageWrapper {
/// Wrap a `SignalMessage` in an `SSKProtoEnvelope`.
private static func createEnvelope(around signalMessage: SignalMessage, timestamp: UInt64) throws -> SSKProtoEnvelope {
guard let keyPair = SSKEnvironment.shared.identityManager.identityKeyPair() else {
owsFailDebug("[Loki] Failed to wrap message in envelope: identityManager.identityKeyPair() is invalid.")
owsFailDebug("[Loki] Failed to wrap message in envelope: SSKEnvironment.shared.identityManager.identityKeyPair() is invalid.")
throw WrappingError.failedToWrapMessageInEnvelope
}
do {

@ -140,7 +140,7 @@ public final class FriendRequestExpirationJob : NSObject {
private func timerDidFire(isMainTimer: Bool) {
guard CurrentAppContext().isMainAppAndActive else {
let infoString = isMainTimer ? "Main timer fired while main app is inactive." : "Ignoring fallback timer for app which is not main and active."
Logger.info("[Loki] Friend request expiration job: \(infoString)")
Logger.info("[Loki] Friend request expiration job running: \(infoString).")
return
}

@ -1342,6 +1342,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
};
switch (statusCode) {
case 0: return messageSend.failure(responseError); // Loki
case 401: {
OWSLogWarn(@"Unable to send due to invalid credentials. Did the user's client get de-authed by "
@"registering elsewhere?");

Loading…
Cancel
Save