Skip to content
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

Handle redacted events #4286

Merged

Conversation

ouchadam
Copy link
Contributor

@ouchadam ouchadam commented Oct 21, 2021

Fixes the redacted messages not being removed and filters out simple redacted messages (as we're handling them)

See #4274 (comment)
#1491

BEFORE AFTER
before-redaction after-redaction

@ouchadam ouchadam requested a review from bmarty October 21, 2021 10:54
@@ -35,7 +36,10 @@ class NotifiableEventProcessor @Inject constructor(
is NotifiableMessageEvent -> if (shouldIgnoreMessageEventInRoom(currentRoomId, it.roomId) || outdatedDetector.isMessageOutdated(it)) {
REMOVE
} else KEEP
is SimpleNotifiableEvent -> KEEP
is SimpleNotifiableEvent -> when (it.type) {
EventType.REDACTION -> REMOVE
Copy link
Contributor Author

@ouchadam ouchadam Oct 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple events are raw events https://github.com/vector-im/element-android/blob/develop/vector/src/main/java/im/vector/app/features/notifications/NotifiableEventResolver.kt#L77

for now I'm filtering out redacted since we're handling them explicitly in the notification logic

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@github-actions
Copy link

Unit Test Results

  60 files  ±0    60 suites  ±0   50s ⏱️ -12s
117 tests +2  117 ✔️ +2  0 💤 ±0  0 ±0 
348 runs  +8  348 ✔️ +8  0 💤 ±0  0 ±0 

Results for commit 3bc4d8a. ± Comparison against base commit 2e1d7b0.

@ouchadam ouchadam merged commit 02b3a42 into feature/adm/notification-redesign Oct 21, 2021
@ouchadam ouchadam deleted the feature/adm/redacted-notifications branch October 21, 2021 11:18
@ouchadam ouchadam mentioned this pull request Oct 21, 2021
@ouchadam ouchadam linked an issue Oct 21, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not notify about m.room.redaction
2 participants