weechat-matrix icon indicating copy to clipboard operation
weechat-matrix copied to clipboard

Multiline paste results in RoomSendError (multiple lines, multiple messages)

Open ghost opened this issue 6 years ago • 12 comments
trafficstars

I noticed that pasting multi-line messages results in a "RoomSendError: 429 Too Many Requests". Is there a Weechat trick to do this natively or is this something that needs to be implemented in weechat-matrix?

This is especially useful for plugins like edit.py or multiline.pl

I see a similar discussion for the wee-slack plugin here: https://github.com/wee-slack/wee-slack/pull/430

ghost avatar Feb 09 '19 14:02 ghost

Currently every line is sent as a single message which can lead to that error.

A new input line parser and multi-line support are currently in the works on the markdown branch.

poljar avatar Feb 09 '19 14:02 poljar

In addition to each line becoming a separate message, I experience that the messages appear in reverse order when viewing them in Riot.

trygveaa avatar Apr 03 '19 11:04 trygveaa

Yes, every line becomes one HTTP request and the order at which the server finishes handling the request isn't guaranteed to be the same.

The markdown branch has the new input line parser implementation also proper multi-line message sending, same way wee-slack handles multi-line messages.

I don't know what the state of affairs is with regards to the parser implementation, maybe @dkasak can shed some light on the progress so far.

poljar avatar Apr 03 '19 12:04 poljar

I haven't had much time to work on the markdown branch yet. It's functional (I'm using it daily), but there are various display bugs (which I'm slowly writing down) and it's unfinished. I've recently rebased it on top of the current work in master. I'll try to get around finishing it up soon.

dkasak avatar Apr 03 '19 19:04 dkasak

Throwing in another request for this one. From a user perspective, this is the only thing keeping me from using Weechat-matrix.

ghost avatar Mar 05 '20 14:03 ghost

Thank you for your work! I see that there has not been any progress. I just had to delete 10 lines, because my multiline message got garbled :smile:. Is there any chance that we get multiline messages soon? Otherwise I have to open another chat client, just to send code blocks...

dschrempf avatar Aug 03 '21 11:08 dschrempf

Sorry, no new features will be developed for the script. I think multiline is supposed to work in the plugin https://github.com/poljar/weechat-matrix-rs/blob/master/src/room/mod.rs#L275.

poljar avatar Aug 03 '21 11:08 poljar

Ah nice! Do you suggest changing over to the new plugin at this point?

dschrempf avatar Aug 03 '21 14:08 dschrempf

No , sadly not yet, not until this is done https://github.com/poljar/weechat-matrix-rs/milestone/1.

poljar avatar Aug 03 '21 14:08 poljar

Ok so there is actually a way to send multiline messages:

/buffer set input_multiline 1

This makes the buffer send messages as multiline

In normal IRC this ends up showing only the first line, but in matrix this properly sends a multiline message.

This works with me using the edit-weechat plugin

Only problem is that in weechat, the lines appear in the wrong order. But the receiving end sees them in the right order

Farzat07 avatar May 14 '22 09:05 Farzat07

If you want to make the change persistent and for all buffers, you have to use the buffer_autoset plugin

Farzat07 avatar May 14 '22 09:05 Farzat07