Open j1warren opened 2 years ago
Nheko already stores up to the last 30000 messages in a room locally, unless it was offline for a while and the gap was too large. What exactly is your goal?
To have complete text log stored locally forever. Just like in pidgin I have logs dating back to 2000s.
All messages on my system would take up around 50GB of storage. I guess this would need to be configurable somehow...
It is common for such logs to be stored in a directory structure by year and/or month. That allows easy manual deletion and/or archival.
I've been pondering doing something like this, mostly to enable client-side searching (because when you're searching for a specific message, you usually want something from quite a while ago...).
It would also make sense to allow turning logging on/off on a per-room basis. 🤔
If nobody else picks this up in the next few months, I'll probably take a shot at it.
I have a plan for search already, that doesn't require you storing messages in plain text. Storing messages unencrypted is not really something I want to do. That should a conscious action to export the messages.
Who said "unencrypted"? 😏
My plan is to store the original JSON as-received in these logs, so as to also preserve relationships between messages and be able to use them as an "offline" view of sorts. What is yours?
Store an encrypted bloom filter in account data, so that you don't need to index all your messages on every device. We already store most of the messages in our database anyway, we just drop the cache, when the server tells us too or you leave a room. Decrypting every message and searching them 1 by 1 would probably be slow.
Ideally I'd like to be able to disable encryption (if something malicious runs code on your computer, offline message encryption won't save you) and be able to grep through logs without Nheko running.
grep -rni "exotic falconry" logs/@username
Ideally I'd like to be able to disable encryption (if something malicious runs code on your computer, offline message encryption won't save you) and be able to grep through logs without Nheko running.
grep -rni "exotic falconry" logs/@username
I don't think that is something we will support. That sounds like a completely different client.
A simple modification to reduce the size of logs would be to allow enabling longs on a per-room basis. I don't necessarily want logs of huge rooms I'm in where there's a lot of random chatter, but I would like logs of DMs or some small rooms.
The Problem
It is probably against matrix design, but would be very nice to have a text message log saved locally, like it was before whatsapp-like IM design took over (e.g. pidgin).
It's not important to follow edits to the messages, etc. Just storing text as it was sent on the first message appearance would be enough.
Does nheko architecture allow to implement this?
The Solution
n/a
Alternatives
No response
Additional context
No response
Happens in the latest version