summaryrefslogtreecommitdiffstats
path: root/model/websocket_client.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/websocket_client.go')
-rw-r--r--model/websocket_client.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/model/websocket_client.go b/model/websocket_client.go
index 7b9dc0b50..a048bd855 100644
--- a/model/websocket_client.go
+++ b/model/websocket_client.go
@@ -92,6 +92,8 @@ func (wsc *WebSocketClient) SendMessage(action string, data map[string]interface
wsc.Conn.WriteJSON(req)
}
+// UserTyping will push a user_typing event out to all connected users
+// who are in the specified channel
func (wsc *WebSocketClient) UserTyping(channelId, parentId string) {
data := map[string]interface{}{
"channel_id": channelId,
@@ -100,3 +102,8 @@ func (wsc *WebSocketClient) UserTyping(channelId, parentId string) {
wsc.SendMessage("user_typing", data)
}
+
+// GetStatuses will return a map of string statuses using user id as the key
+func (wsc *WebSocketClient) GetStatuses() {
+ wsc.SendMessage("get_statuses", nil)
+}