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:
Matthew Hodgson
2026-07-27 15:31:47 +01:00
committed by GitHub
parent 5262350b40
commit a8c79fdd46
6 changed files with 97 additions and 27 deletions
@@ -519,6 +519,7 @@
"notification_invitation_action_reject" = "Reject";
"notification_invite_body" = "Invited you to chat";
"notification_invite_body_with_sender" = "%1$@ invited you to chat";
"notification_live_location_started_body" = "Started sharing their live location";
"notification_mentioned_you_body" = "Mentioned you: %1$@";
"notification_new_messages" = "New Messages";
"notification_reaction_body" = "Reacted with %1$@";
@@ -519,6 +519,7 @@
"notification_invitation_action_reject" = "Reject";
"notification_invite_body" = "Invited you to chat";
"notification_invite_body_with_sender" = "%1$@ invited you to chat";
"notification_live_location_started_body" = "Started sharing their live location";
"notification_mentioned_you_body" = "Mentioned you: %1$@";
"notification_new_messages" = "New Messages";
"notification_reaction_body" = "Reacted with %1$@";
+2
View File
@@ -1192,6 +1192,8 @@ internal nonisolated enum L10n {
internal static func notificationInviteBodyWithSender(_ p1: Any) -> String {
return L10n.tr("Localizable", "notification_invite_body_with_sender", String(describing: p1))
}
/// Started sharing their live location
internal static var notificationLiveLocationStartedBody: String { return L10n.tr("Localizable", "notification_live_location_started_body") }
/// Mentioned you: %1$@
internal static func notificationMentionedYouBody(_ p1: Any) -> String {
return L10n.tr("Localizable", "notification_mentioned_you_body", String(describing: p1))