From e773550d0a2511ef708dd2e80490280296fcbf3b Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 10 Jul 2024 14:44:51 +1000 Subject: [PATCH] Fixed issues with sending sync messages and uploading attachments --- SessionMessagingKit/Crypto/Crypto+SessionMessagingKit.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SessionMessagingKit/Crypto/Crypto+SessionMessagingKit.swift b/SessionMessagingKit/Crypto/Crypto+SessionMessagingKit.swift index db1c36afe..064185ed0 100644 --- a/SessionMessagingKit/Crypto/Crypto+SessionMessagingKit.swift +++ b/SessionMessagingKit/Crypto/Crypto+SessionMessagingKit.swift @@ -26,6 +26,9 @@ public extension Crypto.Generator { let destinationX25519PublicKey: Data = try { switch destination { case .contact(let publicKey): return Data(SessionId(.standard, hex: publicKey).publicKey) + case .syncMessage: + return Data(SessionId(.standard, hex: getUserHexEncodedPublicKey(using: dependencies)).publicKey) + case .closedGroup(let groupPublicKey): return try ClosedGroupKeyPair.fetchLatestKeyPair(db, threadId: groupPublicKey)?.publicKey ?? { throw MessageSenderError.noKeyPair