gabrieljackson / mattermost-plugin-wrangler

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

Add support for MessageLinks in addition to PostIds #178

Closed Haliax closed 2 months ago

Haliax commented 3 months ago

This PR addresses #174.

This PR adds the possibility to use copied message-links instead of the PostID for the "attach", "copy", "merge" and "move" commands. ChannelIDs cannot be replaced by a link yet.

Haliax commented 3 months ago

I was not able to find a defined API function to get the link of a message.

Because of that, I haven't added any tests yet. If there is no function for that, I could create tests with placeholder links instead.

gabrieljackson commented 2 months ago

I was not able to find a defined API function to get the link of a message.

I took a look into the server code on this and don't think we have an easy way to get message links, so let's just build tests with some hardcoded placeholder links.

If you could also update the command help text and the readme with this new option that would be awesome.

Haliax commented 2 months ago

I added the descriptions for the command as well as the tests.

The main tests are within the util-tests. As these functions in every command. Just in case, I also created tests the functions itself.