This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
Push Notification ID compatibility with upcoming Firefish update #994
Labels
bug
Something isn't working
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
.megalodon/mastodon/src/main/java/org/joinmastodon/android/model/PushNotification.java
Lines 13 to 16 in f7dfebc
Despite that, the value is then only used once by converting it back to string in a subsequent API call.
megalodon/mastodon/src/main/java/org/joinmastodon/android/PushNotificationReceiver.java
Lines 98 to 99 in f7dfebc
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. I’m filling mastodon#842 to see if upstream is willing to fix.
Screenshots and screen recordings
N/A
Version
Megalodon version: [e.g. v1.1.4+fork.#]
v2.1.6+fork.110
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: