Bug 445254

Summary: Firefox push notifications misses host information (source of notification) in header
Product: [Plasma] plasma-browser-integration Reporter: Murz <MurzNN>
Component: FirefoxAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED DOWNSTREAM    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Murz 2021-11-10 08:07:33 UTC
SUMMARY
When Firefox receives a push notification, Plasma Notification misses host information of this push notification, so it's impossible to understand which website sends it.

Same feature with Chromium works well - I see the host in notification header.

STEPS TO REPRODUCE
1. Open https://push-notifications-demo.netlify.app/ in Chromium.
Send a push notification, see that in notification header hostname (push-notifications-demo.netlify.app) is present.

2. Open https://push-notifications-demo.netlify.app/ in Firefox.
Send a push notification, see that in notification header hostname (push-notifications-demo.netlify.app) is missing.

EXPECTED RESULT
Hostname must be visible to understand the source of the notification.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 21.04
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.11.0-40-generic (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i3-4360 CPU @ 3.70GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 1 Kai Uwe Broulik 2021-11-10 08:36:53 UTC
If is the application's responsibility to set this attribute. I submitted a patch to Chrome to do that.

P-b-i doesn't mess with browser notifications.
Comment 2 Murz 2021-11-10 09:21:45 UTC
Kai Uwe Broulik, thanks for the information!

Chromium seems sends it in separate kde-specific dbus field (caught using dbus-monitor):
```
      dict entry(
         string "x-kde-origin-name"
         variant             string "push-notifications-demo.netlify.app"
      )
```
But Firefox don't do it.

Can you please post here link to your Chrome patch? Want to submit issue in Firefox with link to it.

And may this be solved via https://addons.mozilla.org/en-US/firefox/addon/plasma-integration/ extension or must be resolved in Firefox core?
Comment 3 Murz 2021-11-10 09:25:58 UTC
Also strange thing is that even with deleted "plasma-browser-integration" system package and uninstalled "Plasma Integration" extension -  Firefox still shows notifications in Plasma, instead of use build-in notifications...
Comment 4 Kai Uwe Broulik 2021-11-10 10:31:30 UTC
See https://chromium.googlesource.com/chromium/src/+/f418f24c72a3fabc8bd236a141f1d043d217bc01

As I said plasma-browser-integration does not handle browser notifications.
Comment 5 Murz 2021-11-10 11:02:43 UTC
Thank you, I've submitted a Firefox bug about this: https://bugzilla.mozilla.org/show_bug.cgi?id=1740458