From eb7561e05bb797a0f925ac69079040016926eef5 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Thu, 29 Jun 2017 07:51:15 -0700 Subject: PLT-6610 sending websocket event for last channel viewed (#6787) --- app/web_conn.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/web_conn.go') diff --git a/app/web_conn.go b/app/web_conn.go index 1ebed9fa5..1cab36a2a 100644 --- a/app/web_conn.go +++ b/app/web_conn.go @@ -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 -- cgit v1.2.3-1-g7c22