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:
parent
3f624c601c
commit
57e0b74482
4 changed files with 27 additions and 5 deletions
|
|
@ -18,6 +18,7 @@ import io.element.android.libraries.matrix.api.core.UserId
|
|||
import io.element.android.libraries.matrix.api.notification.NotificationContent
|
||||
import io.element.android.libraries.matrix.api.notification.NotificationData
|
||||
import io.element.android.libraries.matrix.api.room.isDm
|
||||
import io.element.android.libraries.matrix.impl.room.join.map
|
||||
import io.element.android.services.toolbox.api.systemclock.SystemClock
|
||||
import org.matrix.rustcomponents.sdk.NotificationEvent
|
||||
import org.matrix.rustcomponents.sdk.NotificationItem
|
||||
|
|
@ -59,6 +60,7 @@ class NotificationMapper(
|
|||
timestamp = timestamp,
|
||||
content = notificationContentMapper.map(item.event).getOrThrow(),
|
||||
hasMention = item.hasMention.orFalse(),
|
||||
roomJoinRule = item.roomInfo.joinRule?.map(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue