gTox icon indicating copy to clipboard operation
gTox copied to clipboard

TOX_ERR_FRIEND_SEND_MESSAGE_TOO_LONG

Open Lesik opened this issue 9 years ago • 5 comments

I did not try to reproduce this problem or get additional logs because it seems pretty clear what the issue is.

My idea would be that when gTox notices a message that is too long, it splits the message into multiple parts and delivers them in sequence.

I am using gtox-git from AUR, so probably the newest version.

bildschirmfoto vom 2016-01-04 22-18-35

Lesik avatar Jan 04 '16 21:01 Lesik

https://tox.gitbooks.io/tox-client-standard/content/communication/message_formatting.html

3.5.3 A sending client must not insert or remove any bytes from the original input.

how would I split without removing bytes ?


Ignoring that, I am against message splitting.

Here are some options:

message splitting

  • receiver has no way of knowing text got splitted
  • splitting text can be complex
    • try to split this: 誣珣橣䥜や娩わ詃饥䯞 期ヒョ廨秚訧䩨ぎ珥..
    • try to split this: AAAAAAAAAAAAAAA..
  • what should do the client with very very very large texts ?
    • 1GB text, block until everything is send ?
    • somehow queue, pretty complex..

without message splitting

  • limit text field size, easy
  • not possible to send large messages

KoKuToru avatar Jan 04 '16 21:01 KoKuToru

Wow jayzuz calm down, it was just an idea.

Then tell the GtkEntry to not accept messages longer than a certain length.

Lesik avatar Jan 04 '16 22:01 Lesik

Wow jayzuz calm down, it was just an idea.

And I was just listing some options ?

here is a new idea

message splitting (sometimes)

  • text field size limited by content
    • dynamically changes when text is splittable
    • by a \n
    • by a space ?
      • splitting text by a space is like sending a new line.. so maybe just \n
  • if splittable limit the maximum size
    • 1 MB ?
  • if not splittable limit to maximum single message size

KoKuToru avatar Jan 04 '16 22:01 KoKuToru

I don't see the problem in just setting a fixed message length. It would be easy to implement and would be consistent on both ends of the chat aswell.

Algram avatar Jan 04 '16 23:01 Algram

consistent yeah that's why i thought message splitting is stupid. The receiver should get 1:1 what I sent. Not something else.

But splitting line-by-line... why not ? it will be rendered the same way as one non-splitted message. (EDIT: not true when markdown text formatting support gets added https://github.com/Tox/Tox-Client-Standard/pull/25, this will need extra handling for splitting)

bubble for 11:00:
this is a splited message line 1
message line 2

It might get a own bubble for time, which might suck.

bubble for 11:00:
this is a splited message line 1

bubble for 11:01:
message line 2

and in other tox-clients (without bubbles) it might get a own timestamp...

KoKuToru avatar Jan 04 '16 23:01 KoKuToru