diff options
author | Chris <ccbrown112@gmail.com> | 2017-09-27 11:52:34 -0500 |
---|---|---|
committer | Saturnino Abril <saturnino.abril@gmail.com> | 2017-09-28 00:52:34 +0800 |
commit | 8c80cdde38cceb3424b2b1f43eadf7a1aab0c6df (patch) | |
tree | b3563dfe35ad78991774c9d1842dc439376e1db1 /api/reaction.go | |
parent | 1bd66589a2adc67df5df9c108a2f2ecc77dfdf44 (diff) | |
download | chat-8c80cdde38cceb3424b2b1f43eadf7a1aab0c6df.tar.gz chat-8c80cdde38cceb3424b2b1f43eadf7a1aab0c6df.tar.bz2 chat-8c80cdde38cceb3424b2b1f43eadf7a1aab0c6df.zip |
remove remaining Global() calls (outside of tests) (#7521)
Diffstat (limited to 'api/reaction.go')
-rw-r--r-- | api/reaction.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/api/reaction.go b/api/reaction.go index 28cc9ade2..aada8cdd4 100644 --- a/api/reaction.go +++ b/api/reaction.go @@ -8,7 +8,6 @@ import ( l4g "github.com/alecthomas/log4go" "github.com/gorilla/mux" - "github.com/mattermost/mattermost-server/app" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/utils" ) @@ -112,23 +111,6 @@ func deleteReaction(c *Context, w http.ResponseWriter, r *http.Request) { ReturnStatusOK(w) } -func sendReactionEvent(event string, channelId string, reaction *model.Reaction, post *model.Post) { - // send out that a reaction has been added/removed - - message := model.NewWebSocketEvent(event, "", channelId, "", nil) - message.Add("reaction", reaction.ToJson()) - app.Publish(message) - - // THe post is always modified since the UpdateAt always changes - app.Global().InvalidateCacheForChannelPosts(post.ChannelId) - post.HasReactions = true - post.UpdateAt = model.GetMillis() - umessage := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_POST_EDITED, "", channelId, "", nil) - umessage.Add("post", post.ToJson()) - app.Publish(umessage) - -} - func listReactions(c *Context, w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) |