PLT-2241 Refactored statuses into a more real-time system (#3573)
* Refactored statuses into a more real-time system * Updated package.json with correct commit and fixed minor bug * Minor updates to statuses based on feedback * When setting status online, update only LastActivityAt if status already exists
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
180adc79af
Коммит
c0ab2636d6
@@ -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)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user