element-hq / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://element-hq.github.io/dendrite/
GNU Affero General Public License v3.0
8 stars 3 forks source link

Auto-deleting/self-destructing/disappearing messages #2205

Closed matrixbot closed 2 weeks ago

matrixbot commented 2 weeks ago

This issue was originally created by @wdbm at https://github.com/matrix-org/dendrite/issues/2205.

For everything from psychological health, to spring-cleaning to a gentle bit of security, I and everyone I know who happen to use Signal really love messages that delete after, say, a week. We find it healthy to be able to let go past conversations and to enable people to grow and to move past the past.

We love the P2P approach of Matrix/Dendrite. It is a delight to have a working demonstration of something like this, which has entirely functional audio and video call capabilities.

So, is there a way to have auto-deleting messages today in P2P Matrix, even if by means of an awkward script? And, in any case, may we kindly request that a feature like this be implemented? We'd be delighted to switch when this killer feature is available!

Many thanks for your continued development. :)

matrixbot commented 2 weeks ago

This comment was originally posted by @kegsay at https://github.com/matrix-org/dendrite/issues/2205#issuecomment-1045990497.

You can delete messages in Matrix (they're called redactions) which removes the content of a matrix event. Redactions are propagated over federation and other compliant homeservers should also do the same thing (no guarantees of course).

In P2P, redactions will be less reliable over federation as the nodes will frequently be offline when the redaction is sent. However, Matrix is eventually consistent so when subsequent messages are received in a room the missing redaction will be pulled in, in the majority of cases.

In Dendrite, redactions are permanent. The code will remove the content field in the database; it isn't marked as deleted. This behaviour is modifiable here: https://github.com/matrix-org/dendrite/blob/main/roomserver/storage/shared/storage.go#L26

There is currently no mechanism to automatically redact messages after a certain period of time.

matrixbot commented 2 weeks ago

This comment was originally posted by @kegsay at https://github.com/matrix-org/dendrite/issues/2205#issuecomment-1339402669.

There's nothing actionable here, we can't just remove events from the DAG, so it has to be redacted. There is talk of self-destructing messages in https://github.com/matrix-org/matrix-spec-proposals/pull/2228 - but we are unable to maintain such an MSC at this point in time.