diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-17 21:37:24 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-17 21:37:24 -0400 |
commit | d04e101800c451c4963a530b7cf745666105cec4 (patch) | |
tree | d73fdf97b00d8f40d8888de762574a424df435eb /src/misc/chatutil.cpp | |
parent | 0f3814586e3949d1a7fc15bfc2aff2b99d4975a8 (diff) | |
parent | 857e94af3817932b78963873fb5621ae3c4596f7 (diff) | |
download | abaddon-portaudio-d04e101800c451c4963a530b7cf745666105cec4.tar.gz abaddon-portaudio-d04e101800c451c4963a530b7cf745666105cec4.zip |
Merge branch 'master' into rnnoise
Diffstat (limited to 'src/misc/chatutil.cpp')
-rw-r--r-- | src/misc/chatutil.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/misc/chatutil.cpp b/src/misc/chatutil.cpp index a87df00..e61d32b 100644 --- a/src/misc/chatutil.cpp +++ b/src/misc/chatutil.cpp @@ -74,17 +74,17 @@ void HandleUserMentions(const Glib::RefPtr<Gtk::TextBuffer> &buf, Snowflake chan if (channel->Type == ChannelType::DM || channel->Type == ChannelType::GROUP_DM || !channel->GuildID.has_value() || plain) { if (plain) { - replacement = "@" + user->Username + "#" + user->Discriminator; + replacement = "@" + user->GetUsername(); } else { - replacement = user->GetEscapedBoldString<true>(); + replacement = user->GetUsernameEscapedBoldAt(); } } else { const auto role_id = user->GetHoistedRole(*channel->GuildID, true); const auto role = discord.GetRole(role_id); if (!role.has_value()) - replacement = user->GetEscapedBoldString<true>(); + replacement = user->GetUsernameEscapedBoldAt(); else - replacement = "<span color=\"#" + IntToCSSColor(role->Color) + "\">" + user->GetEscapedBoldString<true>() + "</span>"; + replacement = "<span color=\"#" + IntToCSSColor(role->Color) + "\">" + user->GetUsernameEscapedBoldAt() + "</span>"; } // regex returns byte positions and theres no straightforward way in the c++ bindings to deal with that :( |