Closed hloeung closed 3 years ago
Should there be any documentation update to go along with this change ?
Should there be any documentation update to go along with this change ?
Updated docs with how to update/modify or delete.
Hello, will this be merged any time soon ? Thanks !
@42wim, free to take a look at this one?
Thanks!
That last commit is what @jetpackdanger saw with just PrefixContext/SuffixContext. Thought I'll bundle the fix with this PR, happy to separate it out if you want @42wim.
I'm testing this, but the s//
or s//blah
only works one time, then it stops working.
You don't have this issue?
I'm testing this, but the
s//
ors//blah
only works one time, then it stops working. You don't have this issue?
@42wim, Ah sorry, 9a80c59 broke it. I've fixed it now.
|01:54 <hloeung> Test from web UI [@@f4fc…]
|01:54 <hloeung> s/f4fck99awfgg98crxpturrzwdr/Modify post from web UI
|01:54 <hloeung> Modify post from web UI (edited) [@@f4fc…]
|01:55 <hloeung> Test new one
|01:55 <hloeung> s//Modify the last 'Test new one'
|01:55 <hloeung> Test
|01:55 <hloeung> s//
|01:55 <hloeung> Test
|01:55 <hloeung> s//Test update
|01:55 <hloeung> s//Test update again
Produces:
Also with matterircd generated message/thread IDs:
|02:07 <hloeung> Test from web UI [007]
|02:07 <hloeung> s/007/Update message from web UI
|02:07 <hloeung> Update message from web UI (edited) [007]
|02:07 <hloeung> s//Update again
|02:07 <hloeung> Update again (edited) [007]
|02:07 <hloeung> New message
|02:07 <hloeung> s//
(yes, it really is 2am here heh)
Looks a lot of change, but it's basically just early returns where possible. Thanks for this cool feature :)
Looks a lot of change, but it's basically just early returns where possible. Thanks for this cool feature :)
Ah yes, they all seem good to me. I didn't want to make too many changes blowing out the diff. Thanks for reviewing, let me try convince github to commit those.
sorry, seems my suggestions broke it :(
sorry, seems my suggestions broke it :(
All good, pushed up a fix. Built and am quickly testing :)
LGTM
|02:48 -!- Irssi: Join to #haw-test was synced in 21 secs
|02:48 <hloeung> Test
|02:48 <hloeung> ... [@@51fo…]
|02:48 <hloeung> s//Update last
|02:48 <hloeung> s/51foucr9gffi3mditz61djb5rh/Update by msg ID
|02:48 <hloeung> Update by msg ID (edited) [@@51fo…]
|02:49 <hloeung> s//update last, this is @@51fo
|02:49 <hloeung> update last, this is @@51fo (edited) [@@51fo…]
|02:49 <hloeung> Test, will be deleted
|02:49 <hloeung> s//
|02:49 <hloeung> @@51foucr9gffi3mditz61djb5rh replying to thread
|02:49 <hloeung> s//Update reply to thread...
View from my IRC client, irssi:
🎉
View from my IRC client, irssi:
Oh FWIW, the shortened message IDs, that's with this irssi script which I just pushed to GitHub - https://github.com/hloeung/matterircd-complete (does message/thread ID tab completion, key binding for most recent message/thread IDs and more...)
Store the Mattermost message ID of the most recent message sent to channel. With that, we can use 'last' to modify or delete. e.g.
|21:15 Test
|21:15 s//Update last test message
|21:15 s//
Also add support for modifying messages using the Mattermost message ID. e.g.
|21:14 Test [@@o5ctj8u3qfgtxf5icisewtdyty]
|21:14 s/o5ctj8u3qfgtxf5icisewtdyty/Update
|21:14 Update (edited) [@@o5ctj8u3qfgtxf5icisewtdyty]
|21:14 s/o5ctj8u3qfgtxf5icisewtdyty/
|21:14 Update (deleted) [@@o5ctj8u3qfgtxf5icisewtdyty]