-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Push Notification ID compatibility with upcoming Firefish update #411
Comments
This is an awesome insight. I see what can be done about changing it tomorrow. Thank you for the detailed bug report! |
Since this is also a problem in the official app, have you created an issue there as well? Does the parsing of the payload fail silently, or does it crash the app? In the case of the latter, I would be pretty sure that they would accept a fix, since they have said that no matter what the server does, the app should not crash. |
Technically the parse error throws an exception and crashes the logic. But since it’s running in the background when a push notification arrives, the crash is not visible to the user. Looking at the example you quoted, it looks promising that upstream maintainers are willing to accommodate third-party servers. I’m filling mastodon#842 just to tryout my luck. Thanks for the suggestion! |
Dayum, that’s FAST! Upstream fixed the issue at mastodon/mastodon-android@b2c797f |
That's grishka man for you. I am cherrypicking the commit asap |
Fixed with ef23734 |
Describe the bug
I’m a contributor to Firefish, a Misskey fork. I’m currently working on Mastodon API compatibility layer for push notifications in Firefish.
In most Misskey forks, entity IDs are in the form of strings instead of integers. This is fine with the most part of Megalodon and official upstream. However, when processing incoming push notification payloads, the notification ID is parsed as a
long
instead ofstring
.moshidon/mastodon/src/main/java/org/joinmastodon/android/model/PushNotification.java
Lines 14 to 17 in c64d6db
Despite that, the value is then only used once by converting it back to string in a subsequent API call.
moshidon/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java
Lines 103 to 104 in c64d6db
Parsing the notification ID as
long
would break on Misskey forks with Mastodon API support. I would like to suggest parsing the value as astring
directly.To reproduce
Steps to reproduce the behavior:
PushNotification.java:16
.Does this happen in the official app?
Yes
Since this is a compatibility issue with third-party server programs, it may fall out of scope of upstream project. Please let me know if it is not the case.Filing the same issue to upstream at mastodon#842 to try my luck. The same issue is also opened with Megalodon at sk22#994.Screenshots and screen recordings
N/A
Version
Moshidon version: [e.g. v1.1.4+fork.#]
v2.3.0+fork.105.moshinda-play
Crash log
If you know your way around Android development tools, please consider attaching a crash log, if possible.
N/A
The text was updated successfully, but these errors were encountered: