summaryrefslogtreecommitdiffstats
path: root/app/web_conn.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-06-29 07:51:15 -0700
committerChristopher Speller <crspeller@gmail.com>2017-06-29 07:51:15 -0700
commiteb7561e05bb797a0f925ac69079040016926eef5 (patch)
treede1406e5fad24b3559cd05e7e1e47c3636895b82 /app/web_conn.go
parentbf81fea9f8999c0b8949a9c464ef37b13ba0712b (diff)
downloadchat-eb7561e05bb797a0f925ac69079040016926eef5.tar.gz
chat-eb7561e05bb797a0f925ac69079040016926eef5.tar.bz2
chat-eb7561e05bb797a0f925ac69079040016926eef5.zip
PLT-6610 sending websocket event for last channel viewed (#6787)
Diffstat (limited to 'app/web_conn.go')
-rw-r--r--app/web_conn.go8
1 files changed, 6 insertions, 2 deletions
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