mattermost / mattermost-plugin-msteams

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

MM-57494: welcome message after connecting #586

Closed lieut-data closed 4 months ago

lieut-data commented 5 months ago

Summary

This PR welcomes users when the connect with a message from the bot:

CleanShot 2024-04-04 at 17 54 18@2x

When they choose Mattermost or Microsoft Teams during onboarding (or anytime afterwards from the user preferences pane), they are notified as such:

Choosing Mattermost CleanShot 2024-04-04 at 17 54 39@2x

Choosing Teams CleanShot 2024-04-04 at 17 54 56@2x

Other Changes

This pull request depends on https://github.com/mattermost/mattermost-plugin-msteams/pull/563 for updated unit tests. (Do not merge until that is merged to main.) To test the above, I took @hmhealey's excellent mocked unit tests and modified them to fit into the new "mock-free" testing paradigm. (That's the bulk of this PR -- sorry for the noise! This will all get easier once we've expunged the mock tests.)

I also took the opportunity to centralize most bot messages into a bot_messages.go.

Ticket Link

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

lieut-data commented 5 months ago

Thanks, @asaadmahmood! The dual sync option is a "global setting" as it would affect more than just one user's experience. And the "skip" experience was explicitly requested to avoid a user feeling "trapped".

Could we send a message in the skipped case to bring clarity?

asaadmahmood commented 5 months ago

Is there a difference between skip and choosing MM primary? If is the same, then is the skip really doing anything?

lieut-data commented 5 months ago

@asaadmahmood, Mattermost is the default. Skip indeed does nothing more than provide an escape path.

hmhealey commented 5 months ago

@lieut-data Could you let me know when this PR is updated now that the other PR is merged? I can't tell which commit(s) to review for these changes

lieut-data commented 5 months ago

Sorry about that, @hmhealey! I'll take a look at what changed upstream to make this hard to review and will reinvite.

lieut-data commented 4 months ago

Thanks @sbishel for pulling out the bulk of this change and merging -- I've extracted the remaining part and pushed to https://github.com/mattermost/mattermost-plugin-msteams/pull/623.