From 8c80cdde38cceb3424b2b1f43eadf7a1aab0c6df Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 27 Sep 2017 11:52:34 -0500 Subject: remove remaining Global() calls (outside of tests) (#7521) --- app/status.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/status.go') 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 { -- cgit v1.2.3-1-g7c22