[MM-60886] Fix TypeAssertionError in api4.addChannelMember (#28976)
* Fix TypeAssertionError in api4.addChannelMember * Fix
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a65ba84697
Коммит
b4f337f191
@@ -1780,7 +1780,14 @@ func addChannelMember(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
for _, userId := range interfaceIds {
|
||||
userIds = append(userIds, userId.(string))
|
||||
uid, isString := userId.(string)
|
||||
|
||||
if !isString || !model.IsValidId(uid) {
|
||||
c.SetInvalidParam("user_id in user_ids")
|
||||
return
|
||||
}
|
||||
|
||||
userIds = append(userIds, uid)
|
||||
}
|
||||
} else {
|
||||
userId, ok2 := props["user_id"].(string)
|
||||
|
||||
Ссылка в новой задаче
Block a user