mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fix message wrapping issue
Very occasionally this could fail due to an invalid character in the encrypted message content
This commit is contained in:
parent
95db7d36e9
commit
5ee2307c6a
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ public enum LokiMessageWrapper {
|
|||
let builder = SSKProtoEnvelope.builder(type: message.type, timestamp: message.timestamp)
|
||||
builder.setSource(message.senderPublicKey)
|
||||
builder.setSourceDevice(message.senderDeviceID)
|
||||
if let content = try Data(base64Encoded: message.content) {
|
||||
if let content = try Data(base64Encoded: message.content, options: .ignoreUnknownCharacters) {
|
||||
builder.setContent(content)
|
||||
} else {
|
||||
throw Error.failedToWrapMessageInEnvelope
|
||||
|
|
Loading…
Reference in a new issue