确保同一个账号生成的随机头像一致

This commit is contained in:
2024-08-16 03:42:11 +08:00
parent 53740265b6
commit 9fb176b4bc
5 changed files with 12 additions and 11 deletions

View File

@@ -78,7 +78,7 @@ async def make_query_image(profile: UserProfile) -> bytes:
await render(
'v1/top/info',
Info(
user=People(avatar=get_avatar(), name=profile.user_name),
user=People(avatar=get_avatar(profile.user_name), name=profile.user_name),
today=InfoData(pps=today.pps, lpm=today.lpm, apm=today.apm, apl=today.apl),
history=InfoData(pps=history.pps, lpm=history.lpm, apm=history.apm, apl=history.apl),
),

View File

@@ -223,7 +223,7 @@ async def make_query_image(user_info: UserInfoSuccess, game_data: GameData, even
user=People(
avatar=await get_avatar(event_user_info, 'Data URI', None)
if event_user_info is not None
else get_random_avatar(),
else get_random_avatar(user_info.data.teaid),
name=user_info.data.name,
),
ranking=Ranking(rating=float(user_info.data.ranking), rd=round(float(user_info.data.rd_now), 2)),