-
Notifications
You must be signed in to change notification settings - Fork 33
Fix NullPointerException with double push #976
base: main
Are you sure you want to change the base?
Conversation
@LucasGGamerM / @FineFindus this may interest you |
BTW, from time to time (like, when you open the app, if the code bellow has not been called in the last 6h), it would be a good thing to do:
There was an issue on mastodon preventing doing this, but this has been fixed since mastodon/mastodon#27858 |
The joys of writing Java code... Thanks for catching that.
I'm not quite sure why this is necessary. Could you please clarify? |
If somehow the server wipes the push endpoint, it will register it again. For context, subscribing from time to time was not something we recommended for mastodon before the correction (27858 cited earlier), because mastodon didn't override previous subscriptions but appended it and it ended spamming push providers and adding load to the mastodon queue. |
@FineFindus should I open a PR on moshidon too ? |
I had already mentioned this pr (alongside the other still open ones here) to @LucasGGamerM, but he probably just forgot about it, since there was and still is a lot of work going on with trying to merge all the new code by the official app. If you have the time, a PR would certainly be appreciated :) |
Yes. I completely forgot about this specific one. Silly me :D I am merging it |
I just merged this one and the one of the other notification related crashes PRs I found in Megalodon's repo. It's all on Moshidon now too :D |
I often experience a NullPointer Exception on double push:
This fixes this issue.