From f64100226dbf472754bec32904a4d87bb5d09298 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 31 Oct 2018 22:10:25 +0900 Subject: [PATCH] Revert "Clean up" This reverts commit 8948a0d3a461cb39bcc8267ae291f15af1fac73c. --- src/models/user.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/models/user.ts b/src/models/user.ts index ce877fe27..57973d6ca 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -261,6 +261,16 @@ export const pack = ( if (_user.avatarUrl == null) { _user.avatarUrl = `${config.drive_url}/default-avatar.jpg`; + + // 互換性のため + if (_user.avatarId) { + _user.avatarUrl = `${config.drive_url}/${_user.avatarId}`; + } + } + + // 互換性のため + if (_user.bannerId && _user.bannerUrl == null) { + _user.bannerUrl = `${config.drive_url}/${_user.bannerId}`; } if (!meId || !meId.equals(_user.id) || !opts.detail) {