Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Update MSC3912 implementation: Redaction of related events #15687

Open
giomfo opened this issue May 29, 2023 · 3 comments
Open

Update MSC3912 implementation: Redaction of related events #15687

giomfo opened this issue May 29, 2023 · 3 comments
Assignees
Labels
O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@giomfo
Copy link
Member

giomfo commented May 29, 2023

Description:

Since MSC3912 has been implemented by #14260, we introduced 2 changes into the MSC for which we need to update this implementation :

  • the new property with_relations has been renamed with_rel_types (to prevent us from introducing a new term ("relations") to refer to event relationships). Only the stable name is changed, we keep the existing unstable one.
  • we introduced a catch-all "*" value, which if found in the list means "any relation type"

There is one stuff missing:
The first Synapse PR (#14260) says:

This implementation is lacking a way to keep watch for incoming events that match the redaction criteria after the redaction request finishes, that'll come in a separate PR.

We have to decide if the backend team can work on this border use case by provided an additional PR. If not, we should remove this part from the MSC (details)

@H-Shay H-Shay added T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. labels May 30, 2023
@MatMaul
Copy link
Contributor

MatMaul commented Jun 1, 2023

  • the new property with_relations has been renamed with_rel_types (to prevent us from introducing a new term ("relations") to refer to event relationships). Only the stable name is changed, we keep the existing unstable one.

We are not supporting the stable prefix for now so this part is a no-op.

  • we introduced a catch-all "*" value, which if found in the list means "any relation type"

This part is done.

There is one stuff missing:

This implementation is lacking a way to keep watch for incoming events that match the redaction criteria after the redaction request finishes, that'll come in a separate PR.

It's a bit less simple since we need to store the redaction action somewhere in DB. I am planning to have a look a bit later.

@giomfo
Copy link
Member Author

giomfo commented Aug 10, 2023

There is one stuff missing:

This implementation is lacking a way to keep watch for incoming events that match the redaction criteria after the redaction request finishes, that'll come in a separate PR.

It's a bit less simple since we need to store the redaction action somewhere in DB. I am planning to have a look a bit later.

@wrjlewis Hi, about this opened request, can you confirm that we will not implement in synapse the last remaining point? I would like to unblock the MSC3912 review by resolving the last opened conversation here. Feel free to contact me in DM if you need more context.

@erikjohnston
Copy link
Member

I think it would take a week or two of effort to implement. Having had a brief glance I think there are a few plausible ways of doing this:

  • Check if an event with a relation is redacted via these new rules when we read from the DB; or
  • Check when we persist a new event whether it matches a redaction of one of these rules.

Not sure if we'ed need to add a special table for recording these new sort of redactions or not.

I think the question is now: do we care enough about that MSC to spend the time implementing this now or at some point later?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

No branches or pull requests

4 participants