Skip to content

Commit

Permalink
fix: user::format_username now returns the global_name if it's set (#733
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Commandserver authored Jul 19, 2023
1 parent 5895803 commit 8f2e61a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dpp/user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ std::string user::get_default_avatar_url() const {
}

std::string user::format_username() const {
if (!global_name.empty()) {
return global_name;
}
return username + '#' + leading_zeroes(discriminator, 4);
}

Expand Down

0 comments on commit 8f2e61a

Please sign in to comment.