Render push notifications for live location share starts

This commit is contained in:
Matthew Hodgson
2026-07-13 12:19:08 +01:00
committed by ganfra
parent 50ff04ac88
commit 0a577ffbb8
4 changed files with 45 additions and 6 deletions
@@ -40,11 +40,11 @@ class TimelineEventToNotificationContentMapper {
private fun TimelineEventContent.toContent(senderId: UserId): NotificationContent {
return when (this) {
is TimelineEventContent.MessageLike -> content.toContent(senderId)
is TimelineEventContent.State -> content.toContent()
is TimelineEventContent.State -> content.toContent(senderId)
}
}
private fun StateEventContent.toContent(): NotificationContent.StateEvent {
private fun StateEventContent.toContent(senderId: UserId): NotificationContent.StateEvent {
return when (this) {
StateEventContent.PolicyRuleRoom -> NotificationContent.StateEvent.PolicyRuleRoom
StateEventContent.PolicyRuleServer -> NotificationContent.StateEvent.PolicyRuleServer
@@ -71,7 +71,7 @@ private fun StateEventContent.toContent(): NotificationContent.StateEvent {
is StateEventContent.RoomTopic -> NotificationContent.StateEvent.RoomTopic(topic)
StateEventContent.SpaceChild -> NotificationContent.StateEvent.SpaceChild
StateEventContent.SpaceParent -> NotificationContent.StateEvent.SpaceParent
StateEventContent.BeaconInfo -> NotificationContent.StateEvent.BeaconInfo
StateEventContent.BeaconInfo -> NotificationContent.StateEvent.BeaconInfo(senderId)
}
}