[MM-48649]: Call the SendSubscriptionHistoryEvent function in a GO routine (#21836)
Этот коммит содержится в:
11
app/user.go
11
app/user.go
@@ -316,10 +316,13 @@ func (a *App) createUserOrGuest(c request.CTX, user *model.User, guest bool) (*m
|
|||||||
}, plugin.UserHasBeenCreatedID)
|
}, plugin.UserHasBeenCreatedID)
|
||||||
})
|
})
|
||||||
|
|
||||||
_, cwsErr := a.SendSubscriptionHistoryEvent(ruser.Id)
|
// Create/Update the subscriptionHistoryEvent
|
||||||
if cwsErr != nil {
|
go func() {
|
||||||
c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(cwsErr))
|
_, err := a.SendSubscriptionHistoryEvent(ruser.Id)
|
||||||
}
|
if err != nil {
|
||||||
|
c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(err))
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
return ruser, nil
|
return ruser, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user