mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Use MediaPreviewValue.Private to check if media should be displayed in notifications (#6038)
* Use `MediaPreviewValue.Private` to check if images should be displayed in notifications Also added `NotificationData.roomJoinRule` so we can use it to check if the room is public or not * Add logging message for cases when we should have an image uri it turns out we don't
This commit is contained in:
committed by
GitHub
parent
3f624c601c
commit
57e0b74482
+2
@@ -14,6 +14,7 @@ import io.element.android.libraries.matrix.api.core.SessionId
|
||||
import io.element.android.libraries.matrix.api.core.ThreadId
|
||||
import io.element.android.libraries.matrix.api.core.UserId
|
||||
import io.element.android.libraries.matrix.api.room.RoomMembershipState
|
||||
import io.element.android.libraries.matrix.api.room.join.JoinRule
|
||||
import io.element.android.libraries.matrix.api.timeline.item.event.MessageType
|
||||
|
||||
data class NotificationData(
|
||||
@@ -36,6 +37,7 @@ data class NotificationData(
|
||||
val timestamp: Long,
|
||||
val content: NotificationContent,
|
||||
val hasMention: Boolean,
|
||||
val roomJoinRule: JoinRule?,
|
||||
) {
|
||||
fun getDisambiguatedDisplayName(userId: UserId): String = when {
|
||||
senderDisplayName.isNullOrBlank() -> userId.value
|
||||
|
||||
Reference in New Issue
Block a user