Fix empty string comparison issues in the codebase (#16686)
Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
200a56fa5a
Коммит
94c24eea20
@@ -657,9 +657,9 @@ func addUserToTeamFromInvite(c *Context, w http.ResponseWriter, r *http.Request)
|
||||
defer c.LogAuditRec(auditRec)
|
||||
auditRec.AddMeta("invite_id", inviteId)
|
||||
|
||||
if len(tokenId) > 0 {
|
||||
if tokenId != "" {
|
||||
member, err = c.App.AddTeamMemberByToken(c.App.Session().UserId, tokenId)
|
||||
} else if len(inviteId) > 0 {
|
||||
} else if inviteId != "" {
|
||||
if c.App.Session().Props[model.SESSION_PROP_IS_GUEST] == "true" {
|
||||
c.Err = model.NewAppError("addUserToTeamFromInvite", "api.team.add_user_to_team_from_invite.guest.app_error", nil, "", http.StatusForbidden)
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user