-
Notifications
You must be signed in to change notification settings - Fork 29
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
[MM-53015] Allow the user_agent field to be included in context #480
Conversation
Hello @kyeongsoosoo, Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #480 +/- ##
==========================================
+ Coverage 20.12% 20.16% +0.03%
==========================================
Files 80 80
Lines 6609 6612 +3
==========================================
+ Hits 1330 1333 +3
Misses 5147 5147
Partials 132 132
☔ View full report in Codecov by Sentry. |
/update-branch |
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
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.
Thanks for the contribution and also for adding tests 👍
Summary
When the
InvokeCall
method is executed,AppContext
is assigned an expanded context.mattermost-plugin-apps/server/proxy/invoke_call.go
Lines 185 to 190 in 89a1e4c
I found that the
user_agent
field disappears becauseexpandContext
method initializes theUserAgentContext
when it runs.I changed the
user_agent
andtrack_as_submit
fields to keep their original values on initialization.mattermost-plugin-apps/server/proxy/expand.go
Lines 216 to 217 in 89a1e4c
Ticket Link
Fixes mattermost/mattermost#23621
JIRA https://mattermost.atlassian.net/browse/MM-53015