Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

truncate messages saved in the database? #686

Open
r10s opened this issue May 25, 2019 · 3 comments
Open

truncate messages saved in the database? #686

r10s opened this issue May 25, 2019 · 3 comments
Labels
discussion normally disussions should take place at https://support.delta.chat

Comments

@r10s
Copy link
Member

r10s commented May 25, 2019

afaik, currently, there is no limit in message lengths that is written to the database.

however, there is a limit of the number of characters that is returned in dc_msg_get_text() (currently max. 30kb)

while longer texts (say several mb) are no problem in general, they can cause problems eg. on the current fulltext search implementation which is basically a LIKE '%pattern%' query (yes, it can also be improved), but very long texts may cause any kind of other problems as well.

also, the typical controls are not capable of displaying long text.

so, i would suggest to not write very long texts to the database txt field. however, it can be written to the txt_raw field. another idea may be to convert these long text to an attachment, however, this may be a bit unexpected and also, typically, these long text are not really "user typed" text, it's more uuencoded stuff or pgp-armored-messages or so.

@r10s r10s changed the title truncate messages saved in the database truncate messages saved in the database? May 25, 2019
@r10s r10s added the discussion normally disussions should take place at https://support.delta.chat label May 25, 2019
@csb0730
Copy link
Contributor

csb0730 commented May 27, 2019

I vote for truncate it, but then add a remark in text, like "=== message truncated ===" or so.

@r10s
Copy link
Member Author

r10s commented May 28, 2019

in fact, messages are already truncated now, eg. full quotes are truncated. truncated parts are marked by [...] then.

@csb0730
Copy link
Contributor

csb0730 commented Jun 2, 2019

If that's the marker: Ok

I didn't saw that marker it in that way. I more assumed that the rest of the message is somewhere available if I see "[...]"

Truncate means, no rest available.

I'm ok with that too ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion normally disussions should take place at https://support.delta.chat
Projects
None yet
Development

No branches or pull requests

2 participants