-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redact message on displayed notification #3320
Conversation
4770b4a
to
32835ad
Compare
@@ -418,6 +418,7 @@ class DefaultNotificationCreator @Inject constructor( | |||
event.imageUri?.let { | |||
message.setData("image/", it) | |||
} | |||
message.extras.putString(MESSAGE_EVENT_ID, event.eventId.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put the eventId
into the bundle so that we may be able to find the message to redact it.
32835ad
to
d867a5f
Compare
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3320 +/- ##
===========================================
- Coverage 82.69% 82.66% -0.03%
===========================================
Files 1681 1683 +2
Lines 39415 39475 +60
Branches 4788 4796 +8
===========================================
+ Hits 32594 32633 +39
- Misses 5147 5166 +19
- Partials 1674 1676 +2 ☔ View full report in Codecov by Sentry. |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small remark/question otherwise LGTM
@@ -94,7 +95,10 @@ private fun MessageLikeEventContent.toContent(senderId: UserId): NotificationCon | |||
is MessageLikeEventContent.RoomMessage -> { | |||
NotificationContent.MessageLike.RoomMessage(senderId, EventMessageMapper().mapMessageType(messageType)) | |||
} | |||
is MessageLikeEventContent.RoomRedaction -> NotificationContent.MessageLike.RoomRedaction(redactedEventId = redactedEventId, reason = reason) | |||
is MessageLikeEventContent.RoomRedaction -> NotificationContent.MessageLike.RoomRedaction( | |||
redactedEventId = redactedEventId?.let(::EventId), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe NotificationContent.MessageLike.RoomRedaction.redactedEventId
should be an EventId
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's the case. If you mean MessageLikeEventContent.RoomRedaction.redactedEventId
it's a type from the SDK, so it's a String
.
Content
Ensure that any message currently displayed in a notification is removed when the Event is redacted.
Note: request SDK change in matrix-org/matrix-rust-sdk#3868.
Motivation and context
Closes #3310
Screenshots / GIFs
Tests
Tested devices
Checklist