feat(notifications): show user avatar when sending live notification on Linux (#5971)
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@
|
||||
- Minor: When (re-)connecting, visible channels are now joined first. (#5850)
|
||||
- Minor: Added the ability to filter on messages by the author's user ID (example: `author.user_id == "22484632"`). (#5862)
|
||||
- Minor: Improved error messaging of the `/clip` command. (#5879)
|
||||
- Minor: Added Linux support for Live Notifications toasts. (#5881)
|
||||
- Minor: Added Linux support for Live Notifications toasts. (#5881, #5971)
|
||||
- Minor: Messages can now be deleted from the context menu in a channel. (#5956)
|
||||
- Bugfix: Fixed a potential way to escape the Lua Plugin sandbox. (#5846)
|
||||
- Bugfix: Fixed a crash relating to Lua HTTP. (#5800)
|
||||
|
||||
@@ -310,6 +310,18 @@ void Toasts::sendLibnotify(const QString &channelName,
|
||||
NotifyNotification *notif = notify_notification_new(
|
||||
str.toUtf8().constData(), channelTitle.toUtf8().constData(), nullptr);
|
||||
|
||||
GdkPixbuf *img = gdk_pixbuf_new_from_file(
|
||||
avatarFilePath(channelName).toUtf8().constData(), nullptr);
|
||||
if (img == nullptr)
|
||||
{
|
||||
qWarning(chatterinoNotification) << "Failed to load user avatar image";
|
||||
}
|
||||
else
|
||||
{
|
||||
notify_notification_set_image_from_pixbuf(notif, img);
|
||||
g_object_unref(img);
|
||||
}
|
||||
|
||||
notify_notification_show(notif, nullptr);
|
||||
g_object_unref(notif);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user