Add or remove team to/from an existing scheme does not update server-side cache of channel moderation

Description

Steps:

1) As system admin create a channel-moderated channel with reactions disabled.
2) Create a team scheme channel mentions disabled for members. Do not associate a team to the team scheme. Save the scheme.
3) Observe that a channel member can use channel mentions.
4) Associate the team to the team scheme and save.

Actual: Member can still use channel mentions.
Expected: Members cannot use channel mentions as per the team scheme.

Note1: restarting the server fixes the issue on the server so the cache is not being invalidated upon adding or removing teams to team schemes.

Note2: there and existing bug whereby websockets are not properly updating the schemes associated to teams in redux when a team is added or removed from a team scheme. This has likely been in place since the launch of team schemes. I have filed https://mattermost.atlassian.net/browse/MM-23605 to fix it.

QA Test Steps

Described.

Mana

None

Assignee

Martin Kraft

QA Assignee

Rohitesh Gupta

Reporter

Martin Kraft

Epic Link

Fix versions

Mattermost Team

Enterprise

Sprint

None

Labels

None

QA Testing Areas

Permissions

GitHub Issue

None

Components

None

Severity

None
Configure