Skip to content

deal with long, outgoing messages #2281

@r10s

Description

@r10s

for outgoing messages, currently, it is possible to pass arbitrary long text to dc_msg_set_text() that is also sent with dc_msg_send() then.

however, these outgoing messages cannot be displayed correctly on the sending device after sending as dc_msg_get_text() returns only the first ~30KB of the text; reason is to keep the bubbles usable and also various UI controls get pretty slow if you pass, say 10MB to them.

on the receiving device, things are okay with pr #2264, only the first few KB go to the bubbles and the long text is available with a "Show full message..." button (via dc_msg_has_html()).

(as there is some confusion wrt forwarding here and there: if a message is split into two parts (and has a "Show full message..." therefore), both parts should be forwarded unconditionally)

so, the question is, how to deal with displaying outgoing messages:

  1. we could discourage UI to create such long messages, and add an option to find out the max. recommended text len (longer text will still be sent, but will be truncated by dc_msg_get_text())

  2. we could split on setting/sending as we do on receiving, however, that may have some side effects for bots (in general, sending some 100KB is no issue, the receiver will deal with that) (on setting is maybe not possible due to drafts that cannot exit html-part)

  3. we could let dc_msg_has_html() also check for long, outgoing texts

  4. ...

similar to #2213, this issue is also existent forever :)

Metadata

Metadata

Assignees

Labels

bugSomething is not working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions