fluffychat/lib/pages/chat_list
wcjord 6f32aab48b
fix: show "knock accepted" push notification body instead of "You have been invited" (#5823) (#5835)
* fix: show knock-accepted notification body when invite follows a knock (#5823)

When Synapse accepts a knock it sends an m.room.member invite event. The client
was displaying the generic 'You have been invited by X' push notification body
because the invite event alone doesn't carry prev_content on the push path.

Use KnockTracker (already used for auto-join) to detect knock-accepted invites
and show a dedicated 'Your join request was accepted!' notification body instead.

- Add knockAccepted string to intl_en.arb
- Extract condition into isKnockAcceptedInvite() pure util for testability
- Expose KnockTracker.getKnockedRoomIds() publicly (was _getKnockedRoomIds)
- Override notification body in push_helper.dart (background) and
  local_notifications_extension.dart (foreground/web)
- Unit tests for all isKnockAcceptedInvite() branches (9 tests)

* formatting

* fix up pangea comments

* fix: avoid race condition with knocked room account data updates and local push notification content

* translations

---------

Co-authored-by: ggurdin <ggurdin@gmail.com>
2026-02-27 12:29:50 -05:00
..
chat_list.dart fix: show "knock accepted" push notification body instead of "You have been invited" (#5823) (#5835) 2026-02-27 12:29:50 -05:00
chat_list_body.dart Fluffychat merge 2 (#5590) 2026-02-10 08:01:12 -05:00
chat_list_header.dart Fluffychat merge 2 (#5590) 2026-02-10 08:01:12 -05:00
chat_list_item.dart Fluffychat merge 2 (#5590) 2026-02-10 08:01:12 -05:00
chat_list_view.dart Fluffychat merge 2 (#5590) 2026-02-10 08:01:12 -05:00
client_chooser_button.dart Fluffychat merge 2 (#5590) 2026-02-10 08:01:12 -05:00
dummy_chat_list_item.dart chore: Nicer empty chat list placeholder 2024-08-11 09:40:08 +02:00
navi_rail_item.dart Fluffychat merge 2 (#5590) 2026-02-10 08:01:12 -05:00
search_title.dart Fluffychat merge 2 (#5590) 2026-02-10 08:01:12 -05:00
space_view.dart Fluffychat merge 2 (#5590) 2026-02-10 08:01:12 -05:00
status_msg_list.dart Fluffychat merge 2 (#5590) 2026-02-10 08:01:12 -05:00
test.dart format 2023-11-27 20:06:46 +01:00
unread_bubble.dart Fluffychat merge 2 (#5590) 2026-02-10 08:01:12 -05:00