diff options
Diffstat (limited to 'app/status.go')
-rw-r--r-- | app/status.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/status.go b/app/status.go index fb93a9e39..edfda561b 100644 --- a/app/status.go +++ b/app/status.go @@ -213,15 +213,15 @@ func (a *App) SetStatusOnline(userId string, sessionId string, manual bool) { } if broadcast { - BroadcastStatus(status) + a.BroadcastStatus(status) } } -func BroadcastStatus(status *model.Status) { +func (a *App) BroadcastStatus(status *model.Status) { event := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_STATUS_CHANGE, "", "", status.UserId, nil) event.Add("status", status.Status) event.Add("user_id", status.UserId) - go Publish(event) + go a.Publish(event) } func (a *App) SetStatusOffline(userId string, manual bool) { @@ -245,7 +245,7 @@ func (a *App) SetStatusOffline(userId string, manual bool) { event := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_STATUS_CHANGE, "", "", status.UserId, nil) event.Add("status", model.STATUS_OFFLINE) event.Add("user_id", status.UserId) - go Publish(event) + go a.Publish(event) } func (a *App) SetStatusAwayIfNeeded(userId string, manual bool) { @@ -286,7 +286,7 @@ func (a *App) SetStatusAwayIfNeeded(userId string, manual bool) { event := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_STATUS_CHANGE, "", "", status.UserId, nil) event.Add("status", model.STATUS_AWAY) event.Add("user_id", status.UserId) - go Publish(event) + go a.Publish(event) } func GetStatusFromCache(userId string) *model.Status { |