PLT-6610 sending websocket event for last channel viewed (#6787)

Этот коммит содержится в:
Corey Hulen
2017-06-29 07:51:15 -07:00
коммит произвёл Christopher Speller
родитель bf81fea9f8
Коммит eb7561e05b
9 изменённых файлов: 50 добавлений и 3 удалений

Просмотреть файл

@@ -226,8 +226,12 @@ func (webCon *WebConn) ShouldSendEvent(msg *model.WebSocketEvent) bool {
}
// If the event is destined to a specific user
if len(msg.Broadcast.UserId) > 0 && webCon.UserId != msg.Broadcast.UserId {
return false
if len(msg.Broadcast.UserId) > 0 {
if webCon.UserId == msg.Broadcast.UserId {
return true
} else {
return false
}
}
// if the user is omitted don't send the message