Changed sendNotificationsAndForget to be synchronous and called as a go func
Этот коммит содержится в:
@@ -267,7 +267,7 @@ func handlePostEventsAndForget(c *Context, post *model.Post, triggerWebhooks boo
|
|||||||
members = result.Data.([]model.ChannelMember)
|
members = result.Data.([]model.ChannelMember)
|
||||||
}
|
}
|
||||||
|
|
||||||
sendNotificationsAndForget(c, post, team, channel, profiles, members)
|
go sendNotifications(c, post, team, channel, profiles, members)
|
||||||
go checkForOutOfChannelMentions(c, post, channel, profiles, members)
|
go checkForOutOfChannelMentions(c, post, channel, profiles, members)
|
||||||
|
|
||||||
var user *model.User
|
var user *model.User
|
||||||
@@ -433,9 +433,7 @@ func handleWebhookEventsAndForget(c *Context, post *model.Post, team *model.Team
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team, channel *model.Channel, profileMap map[string]*model.User, members []model.ChannelMember) {
|
func sendNotifications(c *Context, post *model.Post, team *model.Team, channel *model.Channel, profileMap map[string]*model.User, members []model.ChannelMember) {
|
||||||
|
|
||||||
go func() {
|
|
||||||
var channelName string
|
var channelName string
|
||||||
var bodyText string
|
var bodyText string
|
||||||
var subjectText string
|
var subjectText string
|
||||||
@@ -719,7 +717,6 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team,
|
|||||||
}
|
}
|
||||||
|
|
||||||
PublishAndForget(message)
|
PublishAndForget(message)
|
||||||
}()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateMentionCountAndForget(channelId, userId string) {
|
func updateMentionCountAndForget(channelId, userId string) {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user