summaryrefslogtreecommitdiff
path: root/src/notifications/notifications.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-03-09 23:28:10 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2023-03-09 23:28:10 -0500
commite06e574206990c5d0a57d526214f9bf482120412 (patch)
tree6d77ef3b479152b761a8607abeaf2abfd33e197b /src/notifications/notifications.cpp
parent816f1a01ecc3155ad410d1ff34510b558e2d8cbf (diff)
downloadabaddon-portaudio-e06e574206990c5d0a57d526214f9bf482120412.tar.gz
abaddon-portaudio-e06e574206990c5d0a57d526214f9bf482120412.zip
add user avatars to notifications
Diffstat (limited to 'src/notifications/notifications.cpp')
-rw-r--r--src/notifications/notifications.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/notifications/notifications.cpp b/src/notifications/notifications.cpp
index db06651..78ba53c 100644
--- a/src/notifications/notifications.cpp
+++ b/src/notifications/notifications.cpp
@@ -110,7 +110,10 @@ void Notifications::NotifyMessageDM(const Message &message) {
default_action += std::to_string(message.ChannelID);
const auto title = message.Author.Username;
const auto body = message.Content;
- m_notifier.Notify(title, body, default_action);
+
+ Abaddon::Get().GetImageManager().GetCache().GetFileFromURL(message.Author.GetAvatarURL("png", "64"), [=](const std::string &path) {
+ m_notifier.Notify(title, body, default_action, path);
+ });
}
void Notifications::NotifyMessageGuild(const Message &message) {
@@ -131,7 +134,9 @@ void Notifications::NotifyMessageGuild(const Message &message) {
}
}
const auto body = message.Content;
- m_notifier.Notify(title, body, default_action);
+ Abaddon::Get().GetImageManager().GetCache().GetFileFromURL(message.Author.GetAvatarURL("png", "64"), [=](const std::string &path) {
+ m_notifier.Notify(title, body, default_action, path);
+ });
}
bool Notifications::IsDND() const {