The `getSharedChannelsService` method was checking as well for the Shared Channels to be active, which only the lead node of a cluster is, so API operations that should run correctly like sharing/unsharing a channel or inviting/uninviting a remote were returning a 400 bad request. This change updates the method to check for the Shared Channel service to be active only on request, and on doing so it changes the error and status code returned to indicate specifically that the service is running but inactive, and returns a 500 as the situation is not an error on the requester. Co-authored-by: Mattermost Build <build@mattermost.com>
10 KiB
10 KiB