elementary / notifications

Gtk Notifications Server
https://elementary.io
GNU General Public License v3.0
38 stars 6 forks source link

Odin beta 2 notification bubble icon question #137

Open WebShapedBiz opened 3 years ago

WebShapedBiz commented 3 years ago

Describe the bug

I'm using Moderndeck as my Twitter client for some time now and it's hooked up with a notification server. In Hera, every time I get a new tweet the notification bubble pops up, showing at the left side a profile image of the user that just tweeted. In Odin beta 2 however, there is no profile image, just dialog-information status icon.

Platform Information

elementary OS 6 Early Access Linux 5.8.0-50-generic 8× AMD Ryzen 7 4800u with radeon graphics Advanced Micro Devices, Inc. [AMD®/ATI] Renoir

I'm using the latest released beta version with the latest updates at the time of writing this, vanilla installation with no compiling or custom icons or anything like that.

On both computers, Hera and Odin, the ModernDeck is installed as AppImage, and the app has both icons, in app menu and wingpanel, as you can see here: Slika zaslona s 2021-06-27 08-31-01

Don't know if it is a bug or a new feature, so if that's intentional change from Hera, sorry for this issue.

Cheers.

hanaral commented 3 years ago

@WebShapedBiz I presume it has something to do with appimages not integrating with OS apps - how were you able to get the app to show up in settings? did you create your own .desktop file?

WebShapedBiz commented 3 years ago

@hanaral I've actually copied it from my Hera computer, so it is the same .desktop file

hanaral commented 3 years ago

In that case it may be that the app running not being recognised as the source for that notification. Do you happen to know how the app is sending notifications? could it be just notify-send?

WebShapedBiz commented 3 years ago

Sorry, @hanaral, I'm just a user, I have no clue. The point is that the same app and same setup that works in Hera doesn't work in Odin, whether the app uses notify-send or not.

hanaral commented 3 years ago

I'm no developer either. I've never gotten notifications to properly work with electron apps anyway, they would pretty much always send it with the info icon. The reason it doesn't work in Odin may have something to do with the large notification server rewrite and its stricter rules for identifying apps. @jeremypw would you happen to know what might be causing this electron app to send notifs with the default icon?

jeremypw commented 3 years ago

@hanaral Sorry, no. I do not know whether it is a feature of all electron apps or just this one. Probably need to look at the source code.

Marukesu commented 3 years ago

there's two issues, one is that the server don't have support for the image-data hint and should be fixed by #123. the other is the fact that dialog-information is used instead of the application icon. and i believe is a problem with the application (probably the same issue from elementary/wingpanel-indicator-notifications#206).

electron uses the desktopName field of the application package.json as the desktop-entry hint. if that field isn't declared, productName or name is used instead.

looking the ModernDeck's package.json, it uses "ModernDeck" as productName and don't set a desktopName, so you need to make sure the .desktop file is named ModernDeck.desktop, otherwise, the notification server can't find the application .desktop.

WebShapedBiz commented 3 years ago

Thank you @Marukesu for your time and effort.

Cheers.