chore(deps): auto fix by pre-commit hooks

This commit is contained in:
pre-commit-ci[bot]
2025-08-24 13:46:32 +00:00
committed by MingxuanGame
parent ccfafd9c5f
commit 282ae3895e

View File

@@ -118,9 +118,12 @@ class ChannelMessageBase(NotificationDetail):
channel_type: "ChannelType",
) -> Self:
try:
avatar_url = getattr(user, 'avatar_url', 'https://lazer-data.g0v0.top/default.jpg') or 'https://lazer-data.g0v0.top/default.jpg'
avatar_url = (
getattr(user, "avatar_url", "https://lazer-data.g0v0.top/default.jpg")
or "https://lazer-data.g0v0.top/default.jpg"
)
except Exception:
avatar_url = 'https://lazer-data.g0v0.top/default.jpg'
avatar_url = "https://lazer-data.g0v0.top/default.jpg"
instance = cls(
title=truncate(message.content, CONTENT_TRUNCATE),
type=channel_type.value.lower(),