mastodon / mastodon-android

Official Android app for Mastodon
https://app.joinmastodon.org/android
GNU General Public License v3.0
1.65k stars 256 forks source link

"Required field 'visibility' of type StatusPrivacy was null in Status" when fetching (a timeline with) a local-only post #518

Open selfisekai opened 1 year ago

selfisekai commented 1 year ago

blocks some timelines from being displayed like this: image

this occurs when a post in the timeline is set to local-only visibility like this in the JSON response:

    "visibility": "local",

obviously server-specific, does not happen in upstream mastodon (does not have local-only posts). in my case it's on akkoma but probably reproducible with glitch, hometown

sk22 commented 1 year ago

glitch and hometown handle local-only visibility wholly different than akkoma does; on akkoma, the visibility is set to "local", while glitch and hometown send a separate boolean named "local_only", which doesn't break everything. in the process of implementing local-only posting in my fork, i've added support for akkoma's implementation here: https://github.com/sk22/megalodon/commit/0d30cd973ede021f3ebf59ca5a97187d164a1e5c