mattermost / mattermost-plugin-apps

Powers the Mattermost App Framework
https://developers.mattermost.com/integrate/apps/
Apache License 2.0
34 stars 29 forks source link

[MM-58505] Fix group channel expand #489

Closed sblaisot closed 3 months ago

sblaisot commented 4 months ago

Summary

Having channel: summary in the expand section of an app (using app framework) make it unusable in the context of a group channel with the error message

failed to expand context: failed post-expand consistency check: expanded channel's team ID  is different from user agent context 1ntjrqrqdjy8mffhoc44g1e9zr

This is because, like Direct channels, the Group channel type has no TeamID so the consistency check fail and the expand fail, preventing from firing the application call.

This pull request fixes that behavior by ignoring Group Channels on the TeamID consistency check

Ticket Link

Fixes mattermost/mattermost#27271 and JIRA MM-58505

mattermost-build commented 4 months ago

Hello @sblaisot,

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.

sblaisot commented 4 months ago

This can probably be tested. Unfortunately I don't have the required golang skills to add the test myself and I have seen no test on directChannel either so I have no example.

mattermost-build commented 4 months ago

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!

mattermost-build commented 3 months ago

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!

hanzei commented 3 months ago

/update-branch

hanzei commented 3 months ago

/update-branch

hanzei commented 3 months ago

Thanks @sblaisot :+1: