mirror of
https://github.com/vector-im/riotX-android
synced 2025-10-05 15:52:47 +02:00
Render incoming Element Call in the notification (unsupported)
This commit is contained in:
@@ -499,7 +499,11 @@ fun Event.getPollContent(): MessagePollContent? {
|
||||
}
|
||||
|
||||
fun Event.supportsNotification() =
|
||||
this.getClearType() in EventType.MESSAGE + EventType.POLL_START.values + EventType.POLL_END.values + EventType.STATE_ROOM_BEACON_INFO.values
|
||||
this.getClearType() in EventType.MESSAGE +
|
||||
EventType.POLL_START.values +
|
||||
EventType.POLL_END.values +
|
||||
EventType.STATE_ROOM_BEACON_INFO.values +
|
||||
EventType.ELEMENT_CALL_NOTIFY.values
|
||||
|
||||
fun Event.isContentReportable() =
|
||||
this.getClearType() in EventType.MESSAGE + EventType.STATE_ROOM_BEACON_INFO.values
|
||||
|
@@ -32,3 +32,8 @@ data class Mentions(
|
||||
@Json(name = "room") val room: Boolean? = null,
|
||||
@Json(name = "user_ids") val userIds: List<String>? = null,
|
||||
)
|
||||
|
||||
fun ElementCallNotifyContent.isUserMentioned(userId: String): Boolean {
|
||||
return mentions?.room == true ||
|
||||
mentions?.userIds?.contains(userId) == true
|
||||
}
|
||||
|
@@ -61,6 +61,7 @@ internal class DefaultProcessEventForPushTask @Inject constructor(
|
||||
in EventType.POLL_START.values,
|
||||
in EventType.POLL_END.values,
|
||||
in EventType.STATE_ROOM_BEACON_INFO.values,
|
||||
in EventType.ELEMENT_CALL_NOTIFY.values,
|
||||
EventType.MESSAGE,
|
||||
EventType.REDACTION,
|
||||
EventType.ENCRYPTED,
|
||||
|
Reference in New Issue
Block a user