From 1ca336651879b1a33fcffb631fe4f60a593dddcc Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Mon, 30 Nov 2020 09:28:32 +1100 Subject: [PATCH] Fix MessageSendJob deserialization --- SessionMessagingKit/Jobs/MessageSendJob.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SessionMessagingKit/Jobs/MessageSendJob.swift b/SessionMessagingKit/Jobs/MessageSendJob.swift index 504203638..e3937f2e7 100644 --- a/SessionMessagingKit/Jobs/MessageSendJob.swift +++ b/SessionMessagingKit/Jobs/MessageSendJob.swift @@ -31,11 +31,11 @@ public final class MessageSendJob : NSObject, Job, NSCoding { // NSObject/NSCodi guard rawDestination.removeSuffix(")") else { return nil } let publicKey = rawDestination destination = .contact(publicKey: publicKey) - } else if rawDestination.removePrefix("closedGroup") { + } else if rawDestination.removePrefix("closedGroup(") { guard rawDestination.removeSuffix(")") else { return nil } let groupPublicKey = rawDestination destination = .closedGroup(groupPublicKey: groupPublicKey) - } else if rawDestination.removePrefix("openGroup") { + } else if rawDestination.removePrefix("openGroup(") { guard rawDestination.removeSuffix(")") else { return nil } let components = rawDestination.split(separator: ",").map { String($0).trimmingCharacters(in: .whitespacesAndNewlines) } guard components.count == 2, let channel = UInt64(components[0]) else { return nil }