diff options
Diffstat (limited to 'vendor/github.com/mattermost/platform/model/websocket_message.go')
-rw-r--r-- | vendor/github.com/mattermost/platform/model/websocket_message.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/mattermost/platform/model/websocket_message.go b/vendor/github.com/mattermost/platform/model/websocket_message.go index 5eb02642..5c956d57 100644 --- a/vendor/github.com/mattermost/platform/model/websocket_message.go +++ b/vendor/github.com/mattermost/platform/model/websocket_message.go @@ -18,6 +18,7 @@ const ( WEBSOCKET_EVENT_DIRECT_ADDED = "direct_added" WEBSOCKET_EVENT_NEW_USER = "new_user" WEBSOCKET_EVENT_LEAVE_TEAM = "leave_team" + WEBSOCKET_EVENT_UPDATE_TEAM = "update_team" WEBSOCKET_EVENT_USER_ADDED = "user_added" WEBSOCKET_EVENT_USER_UPDATED = "user_updated" WEBSOCKET_EVENT_USER_REMOVED = "user_removed" @@ -27,6 +28,8 @@ const ( WEBSOCKET_EVENT_HELLO = "hello" WEBSOCKET_EVENT_WEBRTC = "webrtc" WEBSOCKET_AUTHENTICATION_CHALLENGE = "authentication_challenge" + WEBSOCKET_EVENT_REACTION_ADDED = "reaction_added" + WEBSOCKET_EVENT_REACTION_REMOVED = "reaction_removed" ) type WebSocketMessage interface { @@ -34,6 +37,7 @@ type WebSocketMessage interface { IsValid() bool DoPreComputeJson() GetPreComputeJson() []byte + EventType() string } type WebsocketBroadcast struct { @@ -63,6 +67,10 @@ func (o *WebSocketEvent) IsValid() bool { return o.Event != "" } +func (o *WebSocketEvent) EventType() string { + return o.Event +} + func (o *WebSocketEvent) DoPreComputeJson() { b, err := json.Marshal(o) if err != nil { @@ -120,6 +128,10 @@ func (o *WebSocketResponse) IsValid() bool { return o.Status != "" } +func (o *WebSocketResponse) EventType() string { + return "" +} + func (o *WebSocketResponse) ToJson() string { b, err := json.Marshal(o) if err != nil { |