Fix bad content types when sending unencrypted media

This commit is contained in:
Florian Renaud 2022-11-03 00:11:23 +01:00
parent f34758c67b
commit c0ba2f2f48
2 changed files with 2 additions and 1 deletions

1
changelog.d/7519.bugfix Normal file
View File

@ -0,0 +1 @@
Voice Broadcast - Fix error on voice messages in unencrypted rooms

View File

@ -408,7 +408,7 @@ internal class UploadContentWorker(val context: Context, params: WorkerParameter
newAttachmentAttributes: NewAttachmentAttributes newAttachmentAttributes: NewAttachmentAttributes
) { ) {
localEchoRepository.updateEcho(eventId) { _, event -> localEchoRepository.updateEcho(eventId) { _, event ->
val content: Content? = event.asDomain().content val content: Content? = event.asDomain(castJsonNumbers = true).content
val messageContent: MessageContent? = content.toModel() val messageContent: MessageContent? = content.toModel()
// Retrieve potential additional content from the original event // Retrieve potential additional content from the original event
val additionalContent = content.orEmpty() - messageContent?.toContent().orEmpty().keys val additionalContent = content.orEmpty() - messageContent?.toContent().orEmpty().keys