summaryrefslogtreecommitdiff
path: root/src/misc/chatutil.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-06-25 05:53:59 +0000
committerGitHub <noreply@github.com>2023-06-25 05:53:59 +0000
commit66101a25cbe4739ade20484c2a020b9130125ec3 (patch)
treef1f3a2084677d90a37d1c4e3b17a19a606fe8d90 /src/misc/chatutil.cpp
parentba24e13419bfa6efd08a0d07f049a6981ff4cd28 (diff)
parent19f7d55c8748e4fcd651540e299347689a2070ad (diff)
downloadabaddon-portaudio-66101a25cbe4739ade20484c2a020b9130125ec3.tar.gz
abaddon-portaudio-66101a25cbe4739ade20484c2a020b9130125ec3.zip
Merge pull request #176 from uowuo/pomelo
pomelo support (and nicknames)
Diffstat (limited to 'src/misc/chatutil.cpp')
-rw-r--r--src/misc/chatutil.cpp8
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 :(