Fix / try to get edited message content first

This commit is contained in:
Valere 2019-06-24 14:35:43 +02:00 committed by Benoit Marty
parent 1feb1f9c3f
commit abb1c3f3c4
1 changed files with 2 additions and 1 deletions

View File

@ -118,7 +118,8 @@ class NotifiableEventResolver(val stringProvider: StringProvider,
notifiableEvent.matrixID = session.sessionParams.credentials.userId
return notifiableEvent
} else {
val body = event.root.getClearContent().toModel<MessageContent>()?.body
val body = event.annotations?.editSummary?.aggregatedContent?.toModel<MessageContent>()?.body
?: event.root.getClearContent().toModel<MessageContent>()?.body
?: stringProvider.getString(R.string.notification_unknown_new_event)
val roomName = room.roomSummary?.displayName ?: ""
val senderDisplayName = event.senderName ?: ""