gabrieljackson / mattermost-plugin-wrangler

Manage Mattermost Messages Masterfully!
Apache License 2.0
49 stars 13 forks source link

Commands: allow links to be used in stead of message IDs. #174

Closed Haliax closed 2 months ago

Haliax commented 5 months ago

The Wrangler-UI and Mattermost's built-in moderation tools are currently not usable on mobile. The only way to move/copy messages on mobile is to use Slash-Commands. An example command would be /wrangler attach message message_id_1 message_id_2.

The only way to get those message IDs on mobile is to use the built-in 'copy link' feature. It gives a link like https://instance_url/team_id/pl/8w89igrsffyt3ghmwsmsgyeoqe. To use that ID for the command, a big part of that link has to be removed manually. It has to be done two times on small displays, and scrolling is quite tedious.

I would suggest allowing the use of URLs as parameters as well. With a simple regex, the URLs could be validated and edited to get the ID of the corresponding messages. This would greatly increase the usability of this plugin.

I am down to create a PR with these changes in the upcoming days if there are no reservations against it.

gabrieljackson commented 4 months ago

Hey Haliax, I think this could be a reasonable thing to add. Before we do so I just want to see if you have tried using the /wrangler list messages command? It works on mobile and gives you output like the following:

The last 20 messages in this channel:
[     system message     ] - <skipped>
[     system message     ] - <skipped>
rm96gt1fajgn8pu1oishwdcuxe - d
ibgfyxjo73n4trppoqcumdy43o - t
[     system message     ] - <skipped>
gesy4rh6zjyqmrksgpiakat6yy - test3
wu8hmyq1efg8pp1ibasw67pz7y - test2
qa1i74781tbpuq5138c1qoncme - test1
7biffregcbrtux97uy85w7rk4w - new2
mdkjyu8jajgmxgqxr5prgq35bc - new1
hcq8u6gostdtjmrdk5t5q5kidh - 4
gbt3w19xhbbyfn8if4m3fxg9fw - 3
ceqeatsotpf5ibuhe38b3mswrw - 2
9a9msijdhifsbge5hbr8igm1fr - 1
[     system message     ] - <skipped>
nx8qifz9rfr5mqkhxkkcs64jgw - vel deleniti totam et libero qui illum aperiam. | ...
gii1f368bpd45xd6suo8jbfb4h - est ab nesciunt sint dicta est illo. | nihil ut su...
zudzdxtiqjrqupghuiquy8ajec - voluptatem et eum ea nihil. | porro qui ipsam haru...
5zfegk8bitghpcpir468yuyetr - quia delectus nam totam repudiandae. | libero expl...
snkkr11h8tddunbmjwpgaowu5r - itaque maiores similique commodi sit nihil! nemo e...

This is how I use wrangler on mobile. It admittedly still isn't super easy to work with, but is maybe good enough for what you are trying to do?

Haliax commented 3 months ago

Thanks for the hint!

For me personally, it is enough. For some our staff-members without tech-background, having to use a /-command on mobile and not being able to use the UI is already a pretty big blocker. Having to use multiple commands to attach a thread, results in them not using wrangler at all.

I hope to solve this issue with the PR I just submitted.

gabrieljackson commented 2 months ago

Thanks for contributing this! It will be included in the next plugin release.