From c91cbf6b9744424793c852618f4a9c2a462a5535 Mon Sep 17 00:00:00 2001 From: ZalterCitty Date: Wed, 22 Oct 2025 17:21:17 +0800 Subject: [PATCH] feat: compatible custom avatar url (#26975) Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> --- api/libs/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/libs/helper.py b/api/libs/helper.py index b878141d8e..60484dd40b 100644 --- a/api/libs/helper.py +++ b/api/libs/helper.py @@ -81,6 +81,8 @@ class AvatarUrlField(fields.Raw): from models import Account if isinstance(obj, Account) and obj.avatar is not None: + if obj.avatar.startswith(("http://", "https://")): + return obj.avatar return file_helpers.get_signed_file_url(obj.avatar) return None