Mono repo -> Master (#22553)
Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
Этот коммит содержится в:
22
server/channels/app/plugin_event.go
Обычный файл
22
server/channels/app/plugin_event.go
Обычный файл
@@ -0,0 +1,22 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package app
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/mattermost/mattermost-server/v6/model"
|
||||
)
|
||||
|
||||
func (ch *Channels) notifyClusterPluginEvent(event model.ClusterEvent, data model.PluginEventData) {
|
||||
buf, _ := json.Marshal(data)
|
||||
if ch.srv.platform.Cluster() != nil {
|
||||
ch.srv.platform.Cluster().SendClusterMessage(&model.ClusterMessage{
|
||||
Event: event,
|
||||
SendType: model.ClusterSendReliable,
|
||||
WaitForAllToSend: true,
|
||||
Data: buf,
|
||||
})
|
||||
}
|
||||
}
|
||||
Ссылка в новой задаче
Block a user