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

Don't over-redact events #431

Merged
merged 9 commits into from
Aug 13, 2020
Merged

Don't over-redact events #431

merged 9 commits into from
Aug 13, 2020

Conversation

jaller94
Copy link
Contributor

@jaller94 jaller94 commented Jun 26, 2020

Fixes #430.

@jaller94 jaller94 changed the title WIP: Don't over-redact messages WIP: Don't over-redact events Jun 26, 2020
@jaller94 jaller94 self-assigned this Jun 26, 2020
@Half-Shot
Copy link
Contributor

How is this one looking?

@jaller94
Copy link
Contributor Author

jaller94 commented Aug 7, 2020

Rick asked me to not mess with the database but query the current state of the Matrix event before redacting it.
I don't know how to ask a Matrix server, if an event has been redacted by another event.

@Half-Shot
Copy link
Contributor

Ugh, short answer is you cannot. But since the loop comes from the slack side we could surely delete the event_id from the DB when we get a redaction from matrix so it won't be possible to over-redact?

@jaller94
Copy link
Contributor Author

jaller94 commented Aug 7, 2020

That is what I had started to implement here, before I got told to try checking the redaction.
Will continue with the "delete the event from the DB" route on Monday.

@jaller94 jaller94 requested a review from a team August 11, 2020 09:36
@jaller94 jaller94 changed the title WIP: Don't over-redact events Don't over-redact events Aug 11, 2020
Copy link
Contributor

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

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

Code change looks sensible if it works :)

@jaller94
Copy link
Contributor Author

jaller94 commented Aug 11, 2020

Current state

  • From Matrix; redacted on Slack – "deleted by Slack Bridge" on Matrix
  • From Matrix; redacted on Matrix – works
  • From Slack; redacted on Slack – still visible on Matrix
  • From Slack; redacted on Matrix – still visible on Slack; over-redacted on Matrix

EDIT: Which - for me - is the same state as on develop.

@Half-Shot
Copy link
Contributor

Yeah, that's concerning.

From Matrix; redacted on Slack – "deleted by Slack Bridge" on Matrix should really be mapping to the person who deleted it, not the bridge bot.

From Slack; redacted on Slack – still visible on Matrix is particularly problematic because that's an easy one in theory to solve.

From Slack; redacted on Matrix – still visible on Slack; over-redacted on Matrix is also bad because it obscures the redactor, also I would have expected deleting from the DB to solve this.

@Half-Shot Half-Shot self-requested a review August 13, 2020 11:30
@Half-Shot
Copy link
Contributor

sounds like it's solved.

@Half-Shot Half-Shot merged commit 0059d22 into develop Aug 13, 2020
@jaller94 jaller94 deleted the j94/dont-overredact branch August 13, 2020 15:12
@jaller94 jaller94 removed their assignment Aug 18, 2020
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.

Slack bridge over-redacts a Matrix users redaction
2 participants