mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 01:45:52 +03:00
Support showing push notifications for poll start events.
This commit is contained in:
parent
bdc9bc0d4d
commit
9fa285e6ca
1 changed files with 4 additions and 3 deletions
|
@ -94,7 +94,7 @@ class NotifiableEventResolver @Inject constructor(
|
|||
}
|
||||
|
||||
suspend fun resolveInMemoryEvent(session: Session, event: Event, canBeReplaced: Boolean): NotifiableEvent? {
|
||||
if (event.getClearType() != EventType.MESSAGE) return null
|
||||
if (event.getClearType() !in listOf(EventType.MESSAGE, EventType.POLL_START)) return null
|
||||
|
||||
// Ignore message edition
|
||||
if (event.isEdition()) return null
|
||||
|
@ -153,7 +153,8 @@ class NotifiableEventResolver @Inject constructor(
|
|||
event.attemptToDecryptIfNeeded(session)
|
||||
// only convert encrypted messages to NotifiableMessageEvents
|
||||
when (event.root.getClearType()) {
|
||||
EventType.MESSAGE -> {
|
||||
EventType.MESSAGE,
|
||||
EventType.POLL_START -> {
|
||||
val body = displayableEventFormatter.format(event, isDm = room.roomSummary()?.isDirect.orFalse(), appendAuthor = false).toString()
|
||||
val roomName = room.roomSummary()?.displayName ?: ""
|
||||
val senderDisplayName = event.senderInfo.disambiguatedDisplayName
|
||||
|
@ -185,7 +186,7 @@ class NotifiableEventResolver @Inject constructor(
|
|||
soundName = null
|
||||
)
|
||||
}
|
||||
else -> null
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue