mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Implements push notifications for LLS via MSC4505 (#5872)
* Render live location share start push notifications in the NSE Live location sharing starts with a cleartext org.matrix.msc3672.beacon_info STATE event, which the NSE previously rendered as the generic fallback notification because NotificationContentBuilder only handled message-like event content. - Handle .state(.beaconInfo) in NotificationContentBuilder: sender display name as the title (same as other messages) with a new localized body, "Started sharing their live location". - Let beaconInfo state events through NotificationHandler's preprocessing (all other state events are still discarded). - Add notification_live_location_started_body, imported from Localazy. - Unit tests for the new state-event notification paths. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * rename processMessageLike in processAsMessage --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Mauro Romito <mauro.romito@element.io>
This commit is contained in:
@@ -148,8 +148,13 @@ nonisolated class NotificationHandler {
|
||||
.beacon:
|
||||
return .unsupportedShouldDiscard
|
||||
}
|
||||
case .state:
|
||||
return .unsupportedShouldDiscard
|
||||
case .state(let stateContent):
|
||||
switch stateContent {
|
||||
case .beaconInfo:
|
||||
return .shouldDisplay
|
||||
default:
|
||||
return .unsupportedShouldDiscard
|
||||
}
|
||||
case .none:
|
||||
return .unsupportedShouldDiscard
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user