diff options
author | Joram Wilander <jwawilander@gmail.com> | 2018-04-20 08:44:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-20 08:44:18 -0400 |
commit | 283f34b9c6d207f0a103e7b4c7f6da2c7481c3ef (patch) | |
tree | 9a9d0dfb9f536d37e9817e3407c32e7ec0c11cdf /model/websocket_message.go | |
parent | 7987c95fcd7f7a9e6d4d174be403bf170f7b9115 (diff) | |
download | chat-283f34b9c6d207f0a103e7b4c7f6da2c7481c3ef.tar.gz chat-283f34b9c6d207f0a103e7b4c7f6da2c7481c3ef.tar.bz2 chat-283f34b9c6d207f0a103e7b4c7f6da2c7481c3ef.zip |
MM-10007 Send an admin and regular WS events when a user is updated (#8588)
* Add user.DeepCopy() function
* Add omit admins/non-admins to WS broadcast and use for updating users
* Updates per feedback and adding unit test for ShouldSendEvent
Diffstat (limited to 'model/websocket_message.go')
-rw-r--r-- | model/websocket_message.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/model/websocket_message.go b/model/websocket_message.go index 4a547bb6a..08c238480 100644 --- a/model/websocket_message.go +++ b/model/websocket_message.go @@ -57,10 +57,12 @@ type WebSocketMessage interface { } type WebsocketBroadcast struct { - OmitUsers map[string]bool `json:"omit_users"` // broadcast is omitted for users listed here - UserId string `json:"user_id"` // broadcast only occurs for this user - ChannelId string `json:"channel_id"` // broadcast only occurs for users in this channel - TeamId string `json:"team_id"` // broadcast only occurs for users in this team + OmitUsers map[string]bool `json:"omit_users"` // broadcast is omitted for users listed here + UserId string `json:"user_id"` // broadcast only occurs for this user + ChannelId string `json:"channel_id"` // broadcast only occurs for users in this channel + TeamId string `json:"team_id"` // broadcast only occurs for users in this team + ContainsSanitizedData bool `json:"-"` + ContainsSensitiveData bool `json:"-"` } type precomputedWebSocketEventJSON struct { |