element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
66 stars 11 forks source link

Auto Delete old messages after given time #363

Open adeorato opened 2 years ago

adeorato commented 2 years ago

Your use case

What would you like to do?

I want to have old messages automatically deleted from the local file system. E.g. after x days or only keep newest 50 (e.g.) messages.

Why would you like to do it?

There are three reasons:

  1. Disk storage -> What has been deleted does not need storage space.
  2. I can't exclude that others get physical access to the PC. What has been deleted cannot be read by the attacker.

How would you like to achieve it?

The other participants still have the message. I am aware of that. Here it is only about the own physical device. If I delete a mail, I also don't expect that the other person doesn't have it anymore.

Here I wish as an implementation that there is a timer per "chat/room" that deletes old message locally after timer expires and also does not re-download from server (or sends a delete to server, whatever is easier to implement). Alternatively, that it displays a configurable maximum number of messages and deletes the older ones locally. Expressed as SQL: "select ... order by id desc fetch first ? rows only" and everything not found by the query will be deleted

Have you considered any alternatives?

Delete messages manually. However, since it is not possible to delete multiple messages at once, this is not an acceptable alternative.

At the moment, I use other clients for more critical stuff, as Elements doesn't meet my security requirement in that regard.

Additional context

No response

t3chguy commented 2 years ago

Duplicate of https://github.com/vector-im/element-meta/issues/729

adeorato commented 2 years ago

@t3chguy no this is not a duplicate. vector-im/element-meta#729 is about server side. This bug is about client side. I already learned that server side won't be done (federal design leads to no new features) so I opened a FR for the client.

So kindly reopen the FR.

ShadowJonathan commented 2 years ago

@adeorato you can achieve the same effect (clearing messages) by going to All Settings -> Help & About -> Clear Cache and Reload, this will fetch all required information from the server and drop all local information, including all messages. E2EE data will not be dropped.

t3chguy commented 2 years ago

Element Web doesn't store history, only a cached window of recent events which can be cleared via the above instructions by @ShadowJonathan. Element Desktop has an additional encrypted search index to power message search which you can disable.

image

I already learned that server side won't be done

Server side has been done though?

https://github.com/matrix-org/synapse/pull/6358

adeorato commented 2 years ago

@ShadowJonathan and @t3chguy I tried your suggestions (clear cache and deactivate message search). I cannot see any difference. All one-to-one chats are still there (with all messages) and no message seems to be missing?

t3chguy commented 2 years ago

Because they're re-fetched from the server, there's no way to exclude them from /sync

adeorato commented 2 years ago

And this is what this feature request is about: "also does not re-download from server"

ShadowJonathan commented 2 years ago

So you're essentially requesting something like WhatsApp/Telegram's "Delete for me" feature?

adeorato commented 2 years ago

So you're essentially requesting something like WhatsApp/Telegram's "Delete for me" feature?

Short answer: Essentially yes.

Long answer: My use case is: If someone gets physically access to my computer he should not be able to restore old messages. I would prefer an automated solution for this (like delete after X days). If it is deleted on the other communication partner side also, I am fine with it, but this is not a hard requirement. So if the mentioned issue https://github.com/vector-im/element-meta/issues/729 is implemented, I could use this feature instead of this. I opened this feature request, cause 3800 exists since 2017 and I did not believe it will be implemented in a reasonable time.

I don't know if this is important, but I care only about 2 person chats. As far as I understand, this is technically also a room.

So the following list would fulfil my requirement: