42wim / matterircd

Connect to your mattermost or slack using your IRC-client of choice.
MIT License
294 stars 60 forks source link

Handle replies to posts part of threads #521

Closed hloeung closed 1 year ago

hloeung commented 1 year ago

When replies are accidentally using the post IDs for those part of threads or reactions, we end up with an error:

msg: ... could not be sent : Invalid RootId parameter.,

This better handles that by trying to get the post and following the parent/root ID of that.

So given the following:

|23:52 <wuser1> my reply message (re @suser2: my parent message …)
[@@hfe4hxb13pr59xf6fs5qfdrquh,gw4zu7kmji8r3byk4qer1dx7xa]

One can reply with either the msg thread/parent/root ID of @@hfe4hxb13pr59xf6fs5qfdrquh or using the actual post ID, @@gw4zu7kmji8r3byk4qer1dx7xa.

It's also useful for reactions too which we're only showing the post ID (will work on a separate PR to show the thread/parent/root ID for reactions too).

42wim commented 1 year ago

LGTM