Skip to content
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

Keep on sync the current team id with mattermost since the beginning #3499

Conversation

jespino
Copy link
Contributor

@jespino jespino commented Aug 1, 2022

Summary

The selected team is handled by the mattermost-webapp code using the mattermost
store data, in this case the current team.

This PR forces to update the mattermost Channels current team id whenever it
changes on Boards.

Ticket Link

Fixes #3458

@jespino jespino added this to the v7.2 milestone Aug 1, 2022
@jespino jespino added 2: Dev Review Requires review by a core committer CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Aug 1, 2022
@jespino jespino assigned jespino and unassigned jespino Aug 1, 2022
store.subscribe(() => {
const currentTeamID = store.getState().teams.currentId
if (currentTeamID && currentTeamID !== fbPrevTeamID) {
if (fbPrevTeamID && window.location.pathname.startsWith(windowAny.frontendBaseURL || '')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this empty if check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 clearly that isn't needed.

@jespino jespino requested a review from Rajat-Dabade August 3, 2022 11:57
Copy link
Contributor

@Rajat-Dabade Rajat-Dabade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@sbishel sbishel merged commit 08dd39d into mattermost-community:main Aug 5, 2022
@mattermod
Copy link
Contributor

Cherry pick is scheduled.

mattermost-build pushed a commit to mattermost-build/focalboard that referenced this pull request Aug 5, 2022
…attermost-community#3499)

* Keep on sync the current team id with mattermost since the beginning

* Removing unneeded code

(cherry picked from commit 08dd39d)
@mattermod mattermod added CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Aug 5, 2022
jespino added a commit that referenced this pull request Aug 5, 2022
…3499) (#3582)

* Keep on sync the current team id with mattermost since the beginning

* Removing unneeded code

(cherry picked from commit 08dd39d)

Co-authored-by: Jesús Espino <jespinog@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: when accessing Boards through a link, the team is not highlighted
4 participants