summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-11-23 14:20:28 -0300
committerHarrison Healey <harrisonmhealey@gmail.com>2016-11-23 12:20:28 -0500
commit36f62c9e82350f58c902f64a5d3304872431ad41 (patch)
tree90240a7b1cbedf7cae120f3f16bb1a476b9fdbc0
parent48533aa483879a19fdd2c1e09c596aa6c028d439 (diff)
downloadchat-36f62c9e82350f58c902f64a5d3304872431ad41.tar.gz
chat-36f62c9e82350f58c902f64a5d3304872431ad41.tar.bz2
chat-36f62c9e82350f58c902f64a5d3304872431ad41.zip
return posted message without waiting for email and push notifications to be sent (#4645)
-rw-r--r--api/post.go6
1 files changed, 3 insertions, 3 deletions
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)
}
}
}