poljar / weechat-matrix

Weechat Matrix protocol script written in python
Other
963 stars 121 forks source link

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

Open ghost opened 5 years ago

ghost commented 5 years ago

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

poljar commented 5 years ago

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.

trygveaa commented 5 years ago

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

poljar commented 5 years ago

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.

dkasak commented 5 years ago

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.

ghost commented 4 years ago

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

dschrempf commented 3 years ago

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...

poljar commented 3 years ago

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.

dschrempf commented 3 years ago

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

poljar commented 3 years ago

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

Farzat07 commented 2 years ago

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 commented 2 years ago

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

MXzander commented 1 week ago

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