fix: preserve pending support state on private profiles
Deploy olons-server production / deploy (push) Successful in 2m42s

This commit is contained in:
Your Name
2026-10-20 21:31:44 +08:00
parent 5f85472757
commit 975a2a2ed2
3 changed files with 47 additions and 34 deletions
+6
View File
@@ -388,6 +388,12 @@ func IsConflict(err error) bool {
return errors.As(err, &target) && target.Status == http.StatusConflict
}
func IsFriendRequestConflict(err error) bool {
var target *Error
return errors.As(err, &target) && target.Status == http.StatusConflict &&
strings.EqualFold(strings.TrimSpace(target.Reason), "FRIEND_REQUEST_CONFLICT")
}
func IsPermissionDenied(err error) bool {
var target *Error
return errors.As(err, &target) && target.Status == http.StatusForbidden