Skip to content

Commit cd481d3

Browse files
committed
Add a message in the notification for the caption. Fixes #2602
1 parent 47d7eac commit cd481d3

File tree

1 file changed

+11
-0
lines changed
  • libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/factories

1 file changed

+11
-0
lines changed

libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/factories/NotificationCreator.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,17 @@ class DefaultNotificationCreator @Inject constructor(
424424
message.extras.putString(MESSAGE_EVENT_ID, event.eventId.value)
425425
}
426426
addMessage(message)
427+
428+
// Add additional message for captions
429+
if (event.imageUri != null && event.body != null) {
430+
addMessage(
431+
MessagingStyle.Message(
432+
event.body,
433+
event.timestamp,
434+
senderPerson,
435+
)
436+
)
437+
}
427438
}
428439
}
429440
}

0 commit comments

Comments
 (0)