From ab18616725fc7c3df00215e63830f6ec0a05976c Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 22 Oct 2015 10:17:25 -0700 Subject: Fixing group code review issues --- api/user.go | 2 +- api/web_team_hub.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/user.go b/api/user.go index 406cbe291..4c53bd104 100644 --- a/api/user.go +++ b/api/user.go @@ -430,7 +430,7 @@ func Login(c *Context, w http.ResponseWriter, r *http.Request, user *model.User, w.Header().Set(model.HEADER_TOKEN, session.Token) tokens := GetMultiSessionCookie(r) - multiToken = "" + multiToken := "" seen := make(map[string]string) seen[session.TeamId] = session.TeamId for _, token := range tokens { diff --git a/api/web_team_hub.go b/api/web_team_hub.go index 6a25b7d3d..12a14da17 100644 --- a/api/web_team_hub.go +++ b/api/web_team_hub.go @@ -96,7 +96,8 @@ func ShouldSendEvent(webCon *WebConn, msg *model.Message) bool { } } else { // Don't share a user's view events with other users - if msg.Action == model.ACTION_CHANNEL_VIEWED { + // but you still need to share it with yourself + if webCon.UserId != msg.UserId && msg.Action == model.ACTION_CHANNEL_VIEWED { return false } -- cgit v1.2.3-1-g7c22