-
Notifications
You must be signed in to change notification settings - Fork 2
Extract code for embedded from mattermost-plugin-msteams
plugin
#11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We should remove the routing behaviour in a follow-up PR.
Golangci-lint is failing, the CI installs one version of the CI and the Makefile is installing another, unsure if this has something to do with it. Also there are some issues with test since we are making an unexpected call to GetApp
on plugin load, so it seems the test-helper is failing on every test.
closeCh := make(chan struct{}) | ||
|
||
// plugin.ClientMain with options allows for reattachment. | ||
go plugin.ClientMain( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably needs th.appClientMock.On("GetApp", p.configuration.AppClientID).Return(&clientmodels.App{}, nil).Once()
around to mock the checkCredentials
call when the plugin activates.
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
Co-authored-by: Felipe Martin <812088+fmartingr@users.noreply.github.com>
I think/thought I did remove it in this PR. Do you mean remove it from the msteams-sync plugin? |
There were several pieces of logic for the routing (of the top of my mind):
|
Summary
This is an extraction of the code needed for embedding MM in MS Teams or other M365 apps from the mattermost-plugin-msteams plugin.
Tested against the
tsomrettam
test tenant, and validated that SSO and notifications are working.Ticket Link
https://mattermost.atlassian.net/browse/MM-63353