Qbox-project / npwd_qbx_garages

0 stars 9 forks source link

Notifications not working #15

Open Villoh opened 1 month ago

Villoh commented 1 month ago

Summary

When you try to locate a car you get an error from npwd

Reproduction

  1. Start npwd, qbx_npwd & npwd_qbx_garages.
  2. Open phone.
  3. Open npwd_qbx_garages app.
  4. Clicking "Locate" on any car.

Expected behavior

Receive an app notification.

Actual behavior

Getting an errror.

Additional context

Error

Failed to create notification. The app with id npwd_qbx_garages was not found!
Make sure you pass the correct appId when creating a notification.

Code where the error is thrown

RegisterNUICallback("npwd:qbx_garage:requestWaypoint", function(data, cb)
    exports.npwd:createNotification({
        notisId = 'npwd:qbx_garage:requestWaypoint',
        appId = 'npwd_qbx_garages',
        content = findVehFromPlateAndLocate(data.plate) and locale('notification.marked') or locale('notification.cannot_locate'),
        keepOpen = false,
        duration = 5000,
        path = '/npwd_qbx_garages',
    })
    cb({})
end)

If i use a default appId like "TWITTER" it works fine.

Current Version

v1.1.0

Custom Resources

none

nazdravi412 commented 1 month ago

I'm getting the same results with npwd_qbx_garages. I also noticed it with npwd_qbx_mail. I get the email when I run /testemail, but no notification.

Failed to create notification. The app with id npwd_qbx_mail was not found! (@npwd/dist/html/assets/index-ebf41f23.js:345) Make sure you pass the correct appId when creating a notification. (@npwd/dist/html/assets/index-ebf41f23.js:345)