Hari-Nagarajan / fairgame

Tool to help us buy hard to find items.
GNU General Public License v3.0
2.44k stars 805 forks source link

Join notification handler not setup properly with Apprise #248

Open jkluch opened 3 years ago

jkluch commented 3 years ago

https://github.com/Hari-Nagarajan/nvidia-bot/blob/e7b1758d517f0acd04596fdf2cefffb8a0298c57/notifications/notifications.py#L132-L139

In order for join notifications to show up as a push notification on android the title field needs to be set. In the above setup it's only setting a message field. I'm ok with submitting a pull request adding a title to the notifications but I don't really know what we'll make the title.. Maybe "nvidia-bot alert"? Or would it be better to refactor in a way where only some notifications use the title field?

LgWagon commented 3 years ago

Yes, no push notification also for me. Where can I define the title?

jkluch commented 3 years ago

I have no idea if there are adverse effects to adding these title args for all apprise notifications which is why I made this issue, was hoping to get other contributors to weigh in.. But you can add the title yourself

https://github.com/Hari-Nagarajan/fairgame/blob/5e0f60f39dedf02ff6bec9a1131d6ea24c8553ec/notifications/notifications.py#L45-L47

The two lines that start with self.apb.notify You want to replace those with self.apb.notify(title="Fairgame Notification" body=message, attach=ss_name) and self.apb.notify(title="Fairgame Notification" body=message)

DakkJaniels commented 3 years ago

Have you been running it with the title?

jkluch commented 3 years ago

Yeah, Join notifications don't alert you otherwise but that's the only notification type I use so I don't know how it affects other notification types.

LgWagon commented 3 years ago

Adding titles now working with Discord. Thank you.

LgWagon commented 3 years ago

It works only notifying the bot has started and logged in, sending the screenshot. However no other notifications, for example when something is in stock or when something is bought.

Djadih commented 3 years ago

Commenting to see if there's any update. I've been encountering the same issue for about a week. I can send notifications from the CLI through Apprise, but not through the "test-notifications" command.

Also, the only time I receive notifications is when the app crashes. Something about the way notifications are sent when in stock is different from the way its sent when the app is killed.

I'm considering submitting a new issue for this as its pretty severe and affects all platforms I've tested.

DakkJaniels commented 3 years ago

Test notifications doesn't work right now because the program closes before it can send the notification out. See if notifications work by running --test in Amazon.