From 36f62c9e82350f58c902f64a5d3304872431ad41 Mon Sep 17 00:00:00 2001 From: enahum Date: Wed, 23 Nov 2016 14:20:28 -0300 Subject: return posted message without waiting for email and push notifications to be sent (#4645) --- api/post.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'api/post.go') diff --git a/api/post.go b/api/post.go index e5e18cb52..5d1a04e00 100644 --- a/api/post.go +++ b/api/post.go @@ -644,7 +644,7 @@ func sendNotifications(c *Context, post *model.Post, team *model.Team, channel * } if userAllowsEmails && status.Status != model.STATUS_ONLINE { - sendNotificationEmail(c, post, profileMap[id], channel, team, senderName, sender) + go sendNotificationEmail(c, post, profileMap[id], channel, team, senderName, sender) } } } @@ -700,7 +700,7 @@ func sendNotifications(c *Context, post *model.Post, team *model.Team, channel * } if DoesStatusAllowPushNotification(profileMap[id], status, post.ChannelId) { - sendPushNotification(post, profileMap[id], channel, senderName, true) + go sendPushNotification(post, profileMap[id], channel, senderName, true) } } @@ -713,7 +713,7 @@ func sendNotifications(c *Context, post *model.Post, team *model.Team, channel * } if DoesStatusAllowPushNotification(profileMap[id], status, post.ChannelId) { - sendPushNotification(post, profileMap[id], channel, senderName, false) + go sendPushNotification(post, profileMap[id], channel, senderName, false) } } } -- cgit v1.2.3-1-g7c22