fix open group message

This commit is contained in:
Ryan ZHAO 2021-01-08 11:11:23 +11:00
parent 91ef23081b
commit ed8eb5a239
2 changed files with 3 additions and 3 deletions

View File

@ -143,7 +143,7 @@ object OpenGroupAPI: DotNetAPI() {
val dateAsString = message["created_at"] as String
val serverTimestamp = format.parse(dateAsString).time
// Verify the message
val groupMessage = OpenGroupMessage(serverID, publicKey, displayName, body, timestamp, openGroupMessageType, quote, attachments, profilePicture, signature, serverTimestamp)
val groupMessage = OpenGroupMessage(serverID, publicKey, displayName, body, timestamp, openGroupMessageType, quote, attachments.toMutableList(), profilePicture, signature, serverTimestamp)
if (groupMessage.hasValidSignature()) groupMessage else null
} catch (exception: Exception) {
Log.d("Loki", "Couldn't parse message for open group with ID: $channel on server: $server from: ${JsonUtil.toJson(message)}. Exception: ${exception.message}")

View File

@ -56,7 +56,7 @@ public data class OpenGroupMessage(
Attachment.Kind.LinkPreview,
server,
attachment.id,
attachment.contentType,
attachment.contentType!!,
attachment.size.get(),
attachment.fileName.get(),
0,
@ -75,7 +75,7 @@ public data class OpenGroupMessage(
Attachment.Kind.Attachment,
server,
attachment.id,
attachment.contentType,
attachment.contentType!!,
attachment.size.get(),
attachment.fileName.get(),
0,