summaryrefslogtreecommitdiffstats
path: root/api/post.go
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-10-14 16:56:13 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-10-19 13:58:15 -0700
commit04bf527966db559523fb0ec317af5076241f1bc5 (patch)
treec80b091f13755fc43ce6f3da46f20ea3af019b3c /api/post.go
parentb5b233f3f02dae61ecf796d8b87a0fafb7b7c499 (diff)
downloadchat-04bf527966db559523fb0ec317af5076241f1bc5.tar.gz
chat-04bf527966db559523fb0ec317af5076241f1bc5.tar.bz2
chat-04bf527966db559523fb0ec317af5076241f1bc5.zip
Changed all goroutine functions to use '...AndForget' as the standard naming system
Diffstat (limited to 'api/post.go')
-rw-r--r--api/post.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/api/post.go b/api/post.go
index 73a63cb72..1d6cec5dd 100644
--- a/api/post.go
+++ b/api/post.go
@@ -201,7 +201,7 @@ func handlePostEventsAndForget(c *Context, post *model.Post, triggerWebhooks boo
channel = result.Data.(*model.Channel)
}
- fireAndForgetNotifications(c, post, team, channel)
+ sendNotificationsAndForget(c, post, team, channel)
var user *model.User
if result := <-uchan; result.Err != nil {
@@ -299,7 +299,7 @@ func handleWebhookEventsAndForget(c *Context, post *model.Post, team *model.Team
}
-func fireAndForgetNotifications(c *Context, post *model.Post, team *model.Team, channel *model.Channel) {
+func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team, channel *model.Channel) {
go func() {
// Get a list of user names (to be used as keywords) and ids for the given team
@@ -434,7 +434,7 @@ func fireAndForgetNotifications(c *Context, post *model.Post, team *model.Team,
}
for id := range toEmailMap {
- fireAndForgetMentionUpdate(post.ChannelId, id)
+ updateMentionCountAndForget(post.ChannelId, id)
}
}
@@ -530,7 +530,7 @@ func fireAndForgetNotifications(c *Context, post *model.Post, team *model.Team,
alreadySeen[session.DeviceId] = session.DeviceId
- utils.FireAndForgetSendAppleNotify(session.DeviceId, subjectPage.Render(), 1)
+ utils.SendAppleNotifyAndForget(session.DeviceId, subjectPage.Render(), 1)
}
}
}
@@ -562,7 +562,7 @@ func fireAndForgetNotifications(c *Context, post *model.Post, team *model.Team,
}()
}
-func fireAndForgetMentionUpdate(channelId, userId string) {
+func updateMentionCountAndForget(channelId, userId string) {
go func() {
if result := <-Srv.Store.Channel().IncrementMentionCount(channelId, userId); result.Err != nil {
l4g.Error("Failed to update mention count for user_id=%v on channel_id=%v err=%v", userId, channelId, result.Err)