Skip to content

Commit

Permalink
Merge pull request #34122 from gijoe0295/gijoe-33452
Browse files Browse the repository at this point in the history
Show default avatar from OldDot
  • Loading branch information
Hayata Suenaga authored Jan 11, 2024
2 parents 46f011f + b5fa6fc commit c080ccc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/UserUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function getDefaultAvatar(accountID = -1, avatarURL?: string): IconAsset {
// But the avatar link still corresponds to the original ID-generated link. So we extract the SVG image number from the backend's link instead of using the user ID directly
let accountIDHashBucket: AvatarRange;
if (avatarURL) {
const match = avatarURL.match(/(default-avatar_)(\d+)(?=\.)/);
const match = avatarURL.match(/(default-avatar_|avatar_)(\d+)(?=\.)/);
const lastDigit = match && parseInt(match[2], 10);
accountIDHashBucket = lastDigit as AvatarRange;
} else {
Expand Down

0 comments on commit c080ccc

Please sign in to comment.