MM-35298: Follow thread when added to channel (#19311)
* MM-35298: Follow thread when added to channel * return better error if thread doesn't exist * update test for possible race * use correct comparision operator
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e2e049e05e
Коммит
7026818f80
@@ -1698,6 +1698,14 @@ func addChannelMember(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if postRootId != "" {
|
||||
err := c.App.UpdateThreadFollowForUserFromChannelAdd(cm.UserId, channel.TeamId, postRootId)
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
auditRec.Success()
|
||||
auditRec.AddMeta("add_user_id", cm.UserId)
|
||||
c.LogAudit("name=" + channel.Name + " user_id=" + cm.UserId)
|
||||
|
||||
Ссылка в новой задаче
Block a user