summaryrefslogtreecommitdiffstats
path: root/api/team.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-07-12 09:36:27 -0400
committerGitHub <noreply@github.com>2016-07-12 09:36:27 -0400
commitad343a0f4ad175053f7d0da12a0587bcbb396d1c (patch)
tree8e1be00202a1d3a037ec75879538eb0ba1f25c01 /api/team.go
parent06eacf30b97aacf6544552448635b7f078d2c90b (diff)
downloadchat-ad343a0f4ad175053f7d0da12a0587bcbb396d1c.tar.gz
chat-ad343a0f4ad175053f7d0da12a0587bcbb396d1c.tar.bz2
chat-ad343a0f4ad175053f7d0da12a0587bcbb396d1c.zip
Added infrastructure for basic WebSocket API (#3432)
Diffstat (limited to 'api/team.go')
-rw-r--r--api/team.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/team.go b/api/team.go
index 7f8a421ce..702ea96d1 100644
--- a/api/team.go
+++ b/api/team.go
@@ -298,7 +298,7 @@ func JoinUserToTeam(team *model.Team, user *model.User) *model.AppError {
InvalidateCacheForUser(user.Id)
// This message goes to every channel, so the channelId is irrelevant
- go Publish(model.NewMessage("", "", user.Id, model.ACTION_NEW_USER))
+ go Publish(model.NewWebSocketEvent("", "", user.Id, model.WEBSOCKET_EVENT_NEW_USER))
return nil
}
@@ -348,7 +348,7 @@ func LeaveTeam(team *model.Team, user *model.User) *model.AppError {
RemoveAllSessionsForUserId(user.Id)
InvalidateCacheForUser(user.Id)
- go Publish(model.NewMessage(team.Id, "", user.Id, model.ACTION_LEAVE_TEAM))
+ go Publish(model.NewWebSocketEvent(team.Id, "", user.Id, model.WEBSOCKET_EVENT_LEAVE_TEAM))
return nil
}