summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/platform/model/websocket_message.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-01-16 23:59:50 +0100
committerWim <wim@42.be>2017-01-17 00:00:26 +0100
commit93114b76828357644afb22f7359c0ba185719478 (patch)
treeaaaf5f855256b3750ee6e5b0c082a5bca0f0dd20 /vendor/github.com/mattermost/platform/model/websocket_message.go
parent9987ac3f13671bf6c4e1530544afa865035b0efd (diff)
downloadmatterbridge-msglm-93114b76828357644afb22f7359c0ba185719478.tar.gz
matterbridge-msglm-93114b76828357644afb22f7359c0ba185719478.tar.bz2
matterbridge-msglm-93114b76828357644afb22f7359c0ba185719478.zip
Sync with mattermost 3.6.0
Diffstat (limited to 'vendor/github.com/mattermost/platform/model/websocket_message.go')
-rw-r--r--vendor/github.com/mattermost/platform/model/websocket_message.go12
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 {