Fixed issues with sending sync messages and uploading attachments

pull/988/head
Morgan Pretty 9 months ago
parent ed34ebcae9
commit e773550d0a

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

Loading…
Cancel
Save