WIP: MSC2815 message undeletion #1162

Draft
Jade wants to merge 3 commits from jade/msc2815 into main
Owner

Opening this PR to make this old code more findable
This needs:

  • A way to store metadata in pduid_originalcontent rather than just the original content (for the redaction time)
  • a way to differentiate between 'did not recieve original message' and 'hard deleted / too old'
  • manual delete all / delete one
  • automatic deletion of old messages
  • a way to disable it

Alternative implementation strategy would be to not redact the event in the database and run the redaction in the sync / federation code, and only redact when we actually want to delete. However that comes with more footguns & woudn't be downgrade safe.

Opening this PR to make this old code more findable This needs: - A way to store metadata in pduid_originalcontent rather than just the original content (for the redaction time) - a way to differentiate between 'did not recieve original message' and 'hard deleted / too old' - manual delete all / delete one - automatic deletion of old messages - a way to disable it Alternative implementation strategy would be to not redact the event in the database and run the redaction in the sync / federation code, and only redact when we actually want to delete. However that comes with more footguns & woudn't be downgrade safe.
Still to do:
- Handling the difference between content that we have deleted and
content we never received
- Deleting the original content on command or expiry

Another question is if we have to store the full original content?
Can we get by with just storing the 'content' field?
fix: Don't store events that have already been redacted
Some checks failed
Release Docker Image / define-variables (push) Successful in 4s
Rust Checks / Format (push) Successful in 1m0s
Rust Checks / Clippy (push) Failing after 4m2s
Rust Checks / Cargo Test (push) Successful in 4m33s
Release Docker Image / build-image (linux/amd64, linux-amd64) (push) Successful in 12m56s
Release Docker Image / build-image (linux/arm64, linux-arm64) (push) Successful in 16m1s
Release Docker Image / merge (push) Successful in 41s
Documentation / Build and Deploy Documentation (pull_request) Successful in 27s
aa29b81ef6
This prevents clobbering
Some checks are pending
Release Docker Image / define-variables (push) Successful in 4s
Rust Checks / Format (push) Successful in 1m0s
Rust Checks / Clippy (push) Failing after 4m2s
Rust Checks / Cargo Test (push) Successful in 4m33s
Release Docker Image / build-image (linux/amd64, linux-amd64) (push) Successful in 12m56s
Release Docker Image / build-image (linux/arm64, linux-arm64) (push) Successful in 16m1s
Release Docker Image / merge (push) Successful in 41s
Documentation / Build and Deploy Documentation (pull_request) Successful in 27s
Checks / *
Required
This pull request has changes conflicting with the target branch.
  • src/api/client/room/event.rs
  • src/service/rooms/timeline/mod.rs
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin jade/msc2815:jade/msc2815
git switch jade/msc2815
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity!1162
No description provided.