client icon indicating copy to clipboard operation
client copied to clipboard

Sending new line in chat creates multiple messages

Open Geosearchef opened this issue 7 years ago • 5 comments

When sending a chat message containing multiple lines (e.g. from copy pasting) the client just decomposes it in to multiple messages, which get's extremly annoying on the receiving side as it creates countless notifications that stack up.

Would suggest just disallowing multiple lines in the chat at once.

Geosearchef avatar May 18 '18 20:05 Geosearchef

I can reproduce the issue, I'll see about fixing it.

Wesmania avatar May 19 '18 10:05 Wesmania

Okay, I can see that there is a related bug in the develop client that both collapses newlines and sends the message multiple times. As for this one - maybe we can just make a notification timeout instead? Which notifications do you have in mind?

Wesmania avatar May 19 '18 10:05 Wesmania

I'm a java client dev and tried to prohibit a notification spam (it fills your left screen with stacked notifications). I can't think of a way to do this as for multiple messages, you want to throw multiple notifications.

The java client just sends new lines as spaces which isn't the right solution in my opinion, as sending multiple lines can be quite useful. Is there a way we can send multiple lines per message? Shouldn't pose a problem for IRC, does it?

Geosearchef avatar May 19 '18 10:05 Geosearchef

https://tools.ietf.org/html/rfc1459#section-2.3.1 claims that messages cannot contain CR or LF except for CRLF at the end, so there's no other way, I'm afraid. Maybe you can add a tiny timeout (like 0.5 second) to notifications, so you only report the first of multiple messages in quick succession? It's very unlikely somebody would type messages that fast unless they're spamming something anyway.

Wesmania avatar May 19 '18 10:05 Wesmania

Adding to the above - sending multiple messages when given a multi-line input seems to have been intended behaviour, it's also present in the 0.16.1 chat implementation.

Wesmania avatar May 19 '18 17:05 Wesmania