prose-im / prose-app-web

Prose Web application. XMPP client for team messaging.
https://prose.org/downloads
Mozilla Public License 2.0
19 stars 2 forks source link

Notifications should include room info #110

Closed nesium closed 2 weeks ago

nesium commented 2 weeks ago

Currently when receiving a message notification it includes the sender name and the body of the message, which is great for direct messages. For groups or channels however it makes the notification look as if the message was sent to you personally. In these cases it would make sense to include the name of the room the message was sent to.

valeriansaliou commented 2 weeks ago

Screenshot 2024-06-16 at 11 05 27 PM

Here's how it looks now if the room name doesn't match the message sender name (ie. not a DM).

nesium commented 2 weeks ago

Thanks!

I'm assuming we can't set a subtitle?

387877

nesium commented 2 weeks ago

Apparently not: https://github.com/tauri-apps/plugins-workspace/blob/7d332ef63428475852d053cd4edc85c49a3a6faa/plugins/notification/ios/Sources/Notification.swift#L32

Makes me want to fork the plugin

nesium commented 2 weeks ago

What about "Valerian Saliou @ general"? So that we have more room for the body.

valeriansaliou commented 2 weeks ago

This is @dscso plugin, you may check here: notifications = { git = "https://github.com/dscso/mac-notifications.git", rev = "c7788fc" }

Edit: apparently it's possible to provide a subtitle! Let me try this...

valeriansaliou commented 2 weeks ago

Screenshot 2024-06-17 at 11 43 39 AM

Does it look better now? In the end, I found out there's no way to set a subtitle anyways, since the body is passed as subtitle in @dscso library.

Edit: I'll flip the subtitle and title so that we get Marc Bauer (general) instead.

nesium commented 2 weeks ago

I also like the version with "Name (Room)" better. The "mac-notifications" plugin/repo uses NSUserNotification which has been deprecated since quite a while. Might make sense to switch to the newer UNNotificationRequest which then would also allow using subtitles.

dscso commented 2 weeks ago

I didn't have the time to port the notification library to UNNotification. There is some draft which I can use, but it is not finished yet.