Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

getDisplayedNotifications returning wrong ids #381

Closed
alloystory opened this issue Sep 5, 2021 · 6 comments
Closed

getDisplayedNotifications returning wrong ids #381

alloystory opened this issue Sep 5, 2021 · 6 comments
Labels
bug Something isn't working needs-review

Comments

@alloystory
Copy link

to reproduce:

await notifee.displayNotification({
    id: 'abc',
    title: 'title',
    body: 'body',
})

console.log(await notifee.getDisplayedNotifications())

expected:

[{
  id: 'abc',
  date: '1630835976663',
  notification: {
      id: 'abc',
      title: 'title',
      body: 'body',
  },
}]

actual:

[{
  id: '3556498',
  date: '1630835976663',
  notification: {
      id: '3556498',
      title: 'title',
      body: 'body',
  },
}]

this happened on Android 11; i didnt test this scenario on other platforms.

@adar2378
Copy link

adar2378 commented Sep 5, 2021

Same issue. I can not cancel those notifications using the returned ids :|

@mikehardy
Copy link
Collaborator

Oh no, that doesn't seem to match expectations. We've got 👀 on it, thank you for reporting @alloystory and confirming @adar2378 - need to investigate if this is usage issue or a bug as a first pass, and if an error, correct of course

@mikehardy mikehardy added bug Something isn't working needs-review labels Sep 5, 2021
@andidev
Copy link

andidev commented Sep 10, 2021

@adar2378
however cancelling works with using the original id notifee.cancelNotification('abc')

@andidev
Copy link

andidev commented Sep 10, 2021

Same problem occurs if string is a number string 123

@adar2378
Copy link

@andidev yes, but for unassigned ids it is impossible to detect and cancel the notification by using getDisplayedNotification API

@helenaford
Copy link
Member

Hi all, this is now fixed in release v3.0.0 (release notes here)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working needs-review
Projects
None yet
Development

No branches or pull requests

5 participants