PLT-5284 Fix webhook notifications for channel creator is not in (#5119)
* Fix webhook notifications for channel creator is not in * Fix unit test
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
6aec2b6c55
Коммит
e8d7701b60
@@ -99,10 +99,6 @@ func handlePostEvents(post *model.Post, teamId string, triggerWebhooks bool) *mo
|
||||
channel = result.Data.(*model.Channel)
|
||||
}
|
||||
|
||||
if _, err := SendNotifications(post, team, channel); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var user *model.User
|
||||
if result := <-uchan; result.Err != nil {
|
||||
return result.Err
|
||||
@@ -110,6 +106,10 @@ func handlePostEvents(post *model.Post, teamId string, triggerWebhooks bool) *mo
|
||||
user = result.Data.(*model.User)
|
||||
}
|
||||
|
||||
if _, err := SendNotifications(post, team, channel, user); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if triggerWebhooks {
|
||||
go func() {
|
||||
if err := handleWebhookEvents(post, team, channel, user); err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user