MM-57786 Fix Shared Channels plugin api (#26753)
* always ping on plugin registration; SharedChannel.IsValid allow no team for GM * wait for services to start before ping * ping plugin remotes synchronously on startup * remove the waitForInterClusterServices stuff * don't set remoteid when inviting remote to channel * Update server/public/model/remote_cluster_test.go Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com> * address review comments --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
@@ -62,6 +62,15 @@ func (a *App) RegisterPluginForSharedChannels(opts model.RegisterPluginOpts) (re
|
||||
mlog.String("remote_id", rcSaved.RemoteId),
|
||||
)
|
||||
|
||||
// ping the plugin remote immediately if the service is running
|
||||
// If the service is not available the ping will happen once the
|
||||
// service starts. This is expected since plugins start before the
|
||||
// service.
|
||||
rcService, _ := a.GetRemoteClusterService()
|
||||
if rcService != nil {
|
||||
rcService.PingNow(rcSaved)
|
||||
}
|
||||
|
||||
return rcSaved.RemoteId, nil
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user