mattermost / mattermost-plugin-msteams

MS Teams plugin for Mattermost
Other
13 stars 11 forks source link

[MM-58155] Separate DM/GM option #643

Closed JulienTant closed 4 months ago

JulienTant commented 5 months ago

Summary

This PR separates the "Enable DM/GM" option into "Enable DM" + "Enable GM", with all the supporting code.

Idea behind how it's done

I kept the same code path mostly because, at least for now, we are treating DMs and GMs the same way.

I renamed a lot of isDirectMessage to isDirectOrGroupMessage to make it clearer that it could be both now that there are two options.

Though/questions

We do have a tag is_direct in a lot of our prometheus metrics, not quite sure if we should rename those, OR only set to true if the message is an actual DM (exclude GM from this tag). ANd do we add a is_gm tag?

Demo

Video of the PR in action:

https://github.com/mattermost/mattermost-plugin-msteams/assets/785518/7bec4c3e-aedd-4d74-80d5-c437f4ae8c8d

Ticket Link

https://mattermost.atlassian.net/browse/MM-58155