Skip to content

Commit

Permalink
Update user.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
KevLehman authored Dec 16, 2024
1 parent 16030d4 commit 699228b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions apps/meteor/server/routes/avatar/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@ export const userAvatarByUsername = async function (request: IncomingMessage, re

// if request starts with @ always return the svg letters
if (requestUsername[0] === '@') {
const usernameWithoutAt = requestUsername.slice(1);
if (settings.get('UI_Use_Name_Avatar')) {
const user = await Users.findOneByUsernameIgnoringCase(usernameWithoutAt, {
projection: {
name: 1,
},
});

if (user?.name) {
serveSvgAvatarInRequestedFormat({ nameOrUsername: user.name, req, res, useAllInitials: true });
return;
}
}
serveSvgAvatarInRequestedFormat({ nameOrUsername: usernameWithoutAt, req, res });
return;
}
Expand Down

0 comments on commit 699228b

Please sign in to comment.