fix send attachments to open groups

pull/469/head
Ryan ZHAO 3 years ago
parent 9a00906069
commit 152d403e2b

@ -70,18 +70,18 @@ data class OpenGroupMessage(
} }
// Attachments // Attachments
val attachments = message.attachmentIDs.mapNotNull { val attachments = message.attachmentIDs.mapNotNull {
val attachment = MessagingConfiguration.shared.messageDataProvider.getAttachmentPointer(it) ?: return@mapNotNull null val attachment = MessagingConfiguration.shared.messageDataProvider.getSignalAttachmentPointer(it) ?: return@mapNotNull null
return@mapNotNull Attachment( return@mapNotNull Attachment(
Attachment.Kind.Attachment, Attachment.Kind.Attachment,
server, server,
attachment.id, attachment.id,
attachment.contentType!!, attachment.contentType!!,
attachment.size.get(), attachment.size.orNull(),
attachment.fileName.get(), attachment.fileName.orNull(),
0, 0,
attachment.width, attachment.width,
attachment.height, attachment.height,
attachment.caption.get(), attachment.caption.orNull(),
attachment.url, attachment.url,
null, null,
null) null)
@ -121,7 +121,7 @@ data class OpenGroupMessage(
val serverID: Long, val serverID: Long,
val contentType: String, val contentType: String,
val size: Int, val size: Int,
val fileName: String, val fileName: String?,
val flags: Int, val flags: Int,
val width: Int, val width: Int,
val height: Int, val height: Int,

Loading…
Cancel
Save