mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
fix open group message
This commit is contained in:
parent
91ef23081b
commit
ed8eb5a239
@ -143,7 +143,7 @@ object OpenGroupAPI: DotNetAPI() {
|
|||||||
val dateAsString = message["created_at"] as String
|
val dateAsString = message["created_at"] as String
|
||||||
val serverTimestamp = format.parse(dateAsString).time
|
val serverTimestamp = format.parse(dateAsString).time
|
||||||
// Verify the message
|
// 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
|
if (groupMessage.hasValidSignature()) groupMessage else null
|
||||||
} catch (exception: Exception) {
|
} 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}")
|
Log.d("Loki", "Couldn't parse message for open group with ID: $channel on server: $server from: ${JsonUtil.toJson(message)}. Exception: ${exception.message}")
|
||||||
|
@ -56,7 +56,7 @@ public data class OpenGroupMessage(
|
|||||||
Attachment.Kind.LinkPreview,
|
Attachment.Kind.LinkPreview,
|
||||||
server,
|
server,
|
||||||
attachment.id,
|
attachment.id,
|
||||||
attachment.contentType,
|
attachment.contentType!!,
|
||||||
attachment.size.get(),
|
attachment.size.get(),
|
||||||
attachment.fileName.get(),
|
attachment.fileName.get(),
|
||||||
0,
|
0,
|
||||||
@ -75,7 +75,7 @@ public data class OpenGroupMessage(
|
|||||||
Attachment.Kind.Attachment,
|
Attachment.Kind.Attachment,
|
||||||
server,
|
server,
|
||||||
attachment.id,
|
attachment.id,
|
||||||
attachment.contentType,
|
attachment.contentType!!,
|
||||||
attachment.size.get(),
|
attachment.size.get(),
|
||||||
attachment.fileName.get(),
|
attachment.fileName.get(),
|
||||||
0,
|
0,
|
||||||
|
Loading…
Reference in New Issue
Block a user