diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index b006926e..a42e4473 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -595,7 +595,13 @@ class BackgroundPush { final title = l10n.unreadMessages(room.notificationCount); // Calculate the body - final body = event?.plaintextBody ?? l10n.openAppToReadMessages; + final body = event.getLocalizedBody( + MatrixLocals(L10n.of(context)), + withSenderNamePrefix: !room.isDirectChat, + plaintextBody: true, + hideReply: true, + hideEdit: true, + ); // The person object for the android message style notification final avatar = room.avatar == null diff --git a/lib/widgets/list_items/chat_list_item.dart b/lib/widgets/list_items/chat_list_item.dart index 4e9ac5bb..a47774d6 100644 --- a/lib/widgets/list_items/chat_list_item.dart +++ b/lib/widgets/list_items/chat_list_item.dart @@ -268,7 +268,12 @@ class ChatListItem extends StatelessWidget { : Text( room.membership == Membership.invite ? L10n.of(context).youAreInvitedToThisChat - : room.lastEvent?.plaintextBody, + : room.lastEvent?.getLocalizedBody( + MatrixLocals(L10n.of(context)), + hideReply: true, + hideEdit: true, + plaintextBody: true, + ), softWrap: false, maxLines: 1, overflow: TextOverflow.ellipsis, diff --git a/lib/widgets/matrix.dart b/lib/widgets/matrix.dart index c1b7f877..23405ccf 100644 --- a/lib/widgets/matrix.dart +++ b/lib/widgets/matrix.dart @@ -221,6 +221,9 @@ class MatrixState extends State with WidgetsBindingObserver { MatrixLocals(L10n.of(widget.context)), withSenderNamePrefix: !room.isDirectChat || room.lastEvent.senderId == client.userID, + plaintextBody: true, + hideReply: true, + hideEdit: true, ); final icon = event.sender.avatarUrl?.getThumbnail(client, width: 64, height: 64, method: ThumbnailMethod.crop) ??