github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/app/plugin_event.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See LICENSE.txt for license information. 3 4 package app 5 6 import ( 7 "github.com/mattermost/mattermost-server/v5/model" 8 ) 9 10 // notifyClusterPluginEvent publishes `event` to other clusters. 11 func (a *App) notifyClusterPluginEvent(event string, data model.PluginEventData) { 12 if a.Cluster() != nil { 13 a.Cluster().SendClusterMessage(&model.ClusterMessage{ 14 Event: event, 15 SendType: model.CLUSTER_SEND_RELIABLE, 16 WaitForAllToSend: true, 17 Data: data.ToJson(), 18 }) 19 } 20 }