mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
fix sending attachments(image) in open groups
This commit is contained in:
parent
97a9446eae
commit
b490ed0c22
@ -113,7 +113,7 @@ object OpenGroupAPI: DotNetAPI() {
|
|||||||
val id = attachmentAsJSON["id"] as? Long ?: (attachmentAsJSON["id"] as? Int)?.toLong() ?: (attachmentAsJSON["id"] as String).toLong()
|
val id = attachmentAsJSON["id"] as? Long ?: (attachmentAsJSON["id"] as? Int)?.toLong() ?: (attachmentAsJSON["id"] as String).toLong()
|
||||||
val contentType = attachmentAsJSON["contentType"] as String
|
val contentType = attachmentAsJSON["contentType"] as String
|
||||||
val size = attachmentAsJSON["size"] as? Int ?: (attachmentAsJSON["size"] as? Long)?.toInt() ?: (attachmentAsJSON["size"] as String).toInt()
|
val size = attachmentAsJSON["size"] as? Int ?: (attachmentAsJSON["size"] as? Long)?.toInt() ?: (attachmentAsJSON["size"] as String).toInt()
|
||||||
val fileName = attachmentAsJSON["fileName"] as String
|
val fileName = attachmentAsJSON["fileName"] as? String
|
||||||
val flags = 0
|
val flags = 0
|
||||||
val url = attachmentAsJSON["url"] as String
|
val url = attachmentAsJSON["url"] as String
|
||||||
val caption = attachmentAsJSON["caption"] as? String
|
val caption = attachmentAsJSON["caption"] as? String
|
||||||
|
@ -74,7 +74,7 @@ data class OpenGroupMessage(
|
|||||||
attachment.id,
|
attachment.id,
|
||||||
attachment.contentType!!,
|
attachment.contentType!!,
|
||||||
attachment.size.orNull(),
|
attachment.size.orNull(),
|
||||||
attachment.fileName.orNull(),
|
attachment.fileName.orNull() ?: "",
|
||||||
0,
|
0,
|
||||||
attachment.width,
|
attachment.width,
|
||||||
attachment.height,
|
attachment.height,
|
||||||
|
Loading…
Reference in New Issue
Block a user