diff options
author | Chris <ccbrown112@gmail.com> | 2017-09-19 18:31:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-19 18:31:35 -0500 |
commit | ac74066f0e4f3d62f2d4645c3fa34b88c13958d1 (patch) | |
tree | 9e1cb80eae1b4a2e9dcc2272744c4a9db1b4b804 /app/notification.go | |
parent | 7e4ff6adcccc4cc5a8fb8cfa853417ec52bf78f4 (diff) | |
download | chat-ac74066f0e4f3d62f2d4645c3fa34b88c13958d1.tar.gz chat-ac74066f0e4f3d62f2d4645c3fa34b88c13958d1.tar.bz2 chat-ac74066f0e4f3d62f2d4645c3fa34b88c13958d1.zip |
remove einterface gets (#7455)
Diffstat (limited to 'app/notification.go')
-rw-r--r-- | app/notification.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/notification.go b/app/notification.go index 511960f84..cc3db8b55 100644 --- a/app/notification.go +++ b/app/notification.go @@ -18,7 +18,6 @@ import ( "unicode" l4g "github.com/alecthomas/log4go" - "github.com/mattermost/mattermost-server/einterfaces" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/store" "github.com/mattermost/mattermost-server/utils" @@ -369,8 +368,8 @@ func (a *App) sendNotificationEmail(post *model.Post, user *model.User, channel } }() - if einterfaces.GetMetricsInterface() != nil { - einterfaces.GetMetricsInterface().IncrementPostSentEmail() + if a.Metrics != nil { + a.Metrics.IncrementPostSentEmail() } return nil @@ -641,8 +640,8 @@ func (a *App) sendPushNotification(post *model.Post, user *model.User, channel * go a.sendToPushProxy(tmpMessage, session) - if einterfaces.GetMetricsInterface() != nil { - einterfaces.GetMetricsInterface().IncrementPostSentPush() + if a.Metrics != nil { + a.Metrics.IncrementPostSentPush() } } @@ -701,7 +700,7 @@ func (a *App) sendToPushProxy(msg model.PushNotification, session *model.Session if pushResponse[model.PUSH_STATUS] == model.PUSH_STATUS_REMOVE { l4g.Info("Device was reported as removed for UserId=%v SessionId=%v removing push for this session", session.UserId, session.Id) a.AttachDeviceId(session.Id, "", session.ExpiresAt) - ClearSessionCacheForUser(session.UserId) + a.ClearSessionCacheForUser(session.UserId) } if pushResponse[model.PUSH_STATUS] == model.PUSH_STATUS_FAIL { |