summaryrefslogtreecommitdiffstats
path: root/app/web_conn.go
diff options
context:
space:
mode:
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