ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.16k stars 59 forks source link

[Bug] nheko actions didnt get pick up #269

Closed slikie closed 1 year ago

slikie commented 1 year ago

Describe the bug in the instant messaging app nheko, the actions of notifications that are from nheko never get picked up. that mean clicking on the notif doesn't direct to chat room, and inline reply feature doesn't get triggered.

To Reproduce Steps to reproduce the behavior:

  1. Open nheko
  2. Receive a message (no inline)
  3. clicking on it
  4. nheko window doesn't get spawned, nor the existing window direct to incoming message.

Expected behavior

Logs

** (swaync:1497): DEBUG: 23:18:34.349: notiDaemon.vala:171: Notification: 
category:       im.received
image_data:     true
expire_timeout:     -1
replaces_id:        0
desktop_entry:      nheko
body:           kyy : hi
app_icon:       
action_icons:       false
time:           1685373514
hints:      
    image-data: data
    sound-name: 'message-new-instant'
    desktop-entry: 'nheko'
    category: 'im.received'
applied_id:     1
image_path:     (null)
inline-reply:       (null)
app_name:       nheko
summary:        kyy 
icon_data:      false
resident:       false
default_action:     (null)
actions:        
urgency:        Low

Desktop (please complete the following information):

Additional context Tried with dunst and kde, both doesn't have the problem

ErikReider commented 1 year ago

Seems like the application isn't sending those actions... Sometimes restarting the applications after starting swaync fixes these bugs

slikie commented 1 year ago

Unfortunately that's not the case

ErikReider commented 1 year ago

Strange... Do other applications work?

slikie commented 1 year ago

Yes happy to report neochat works perfectly, with inline reply and all

ErikReider commented 1 year ago

My guess would be that they're checking for a specific hint for inline-replies that swaync's not exporting?

slikie commented 1 year ago

not sure that's the case with dunst. unfortunately something like dunst -verbosity debug doesn't give any usable logs. here's the action view tho

image

ErikReider commented 1 year ago

What is the provided value? (Example, notify-send 'Test notification' 'text' -A inline-reply=Reply: "Reply" would be the provided value)

slikie commented 1 year ago

That may be the issue - there are no value. mako seems to be easier to get debug info, with a log like this

                        {
                                "app-name" : {
                                        "type" : "s",
                                        "data" : "nheko"
                                },
                                "app-icon" : {
                                        "type" : "s",
                                        "data" : ""
                                },
                                "category" : {
                                        "type" : "s",
                                        "data" : "im.received"
                                },
                                "summary" : {
                                        "type" : "s",
                                        "data" : "tamy"
                                },
                                "body" : {
                                        "type" : "s",
                                        "data" : "what? : wanna play anything?"
                                },
                                "id" : {
                                        "type" : "u",
                                        "data" : 20
                                },
                                "actions" : {
                                        "type" : "a{ss}",
                                        "data" : {
                                                "inline-reply" : "",
                                                "default" : ""
                                        }
                                }
                        },
ErikReider commented 1 year ago

Have you enabled the inline-replies in your config? Remember that the inline-replies only works in the Control Center if your compositor doesn't support ON_DEMAND keyboard interactivity. Sway and Hyprland don't support this yet