Skip to content
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

Api returns null media_attachments for replies #2234

Closed
connyduck opened this issue Jun 6, 2020 · 0 comments
Closed

Api returns null media_attachments for replies #2234

connyduck opened this issue Jun 6, 2020 · 0 comments
Labels
🔃 API For accessing Pixelfed data

Comments

@connyduck
Copy link

I know you can't add attachments to replies on Pixelfed, but the Mastodon api specifies media_attachments as non-null. Pixelfed should just return an empty array instead of null.

This causes crahes in client apps, e.g. tuskyapp/Tusky#1781

https://docs.joinmastodon.org/entities/status/

Example json, received from the https://pixelfed.social/api/v1/notifications endpoint. Note the missing media_attachments on the status object.

JSON
 {
    "id": "445880",
    "type": "mention",
    "created_at": "2020-06-06T00:02:50.000000Z",
    "account": {
      "id": "172618787449868288",
      "username": "ibon",
      "acct": "ibon",
      "display_name": "ibon",
      "locked": false,
      "created_at": "2020-05-31T08:05:26.000000Z",
      "followers_count": 3,
      "following_count": 5,
      "statuses_count": 5,
      "note": "oc memes cha cha real smooth",
      "url": "https:\/\/pixelfed.social\/ibon",
      "avatar": "https:\/\/pixelfed.social\/storage\/avatars\/017\/261\/878\/744\/986\/828\/8\/SUFX3lFK91aQMF34GPc3_avatar.jpeg?v=2",
      "avatar_static": "https:\/\/pixelfed.social\/storage\/avatars\/017\/261\/878\/744\/986\/828\/8\/SUFX3lFK91aQMF34GPc3_avatar.jpeg?v=2",
      "header": "",
      "header_static": "",
      "emojis": [],
      "moved": null,
      "fields": null,
      "bot": false,
      "software": "pixelfed",
      "is_admin": false
    },
    "status": {
      "id": "174671664158740480",
      "created_at": "2020-06-06T00:02:49.000000Z",
      "in_reply_to_id": "174250273865338880",
      "in_reply_to_account_id": 1138,
      "sensitive": false,
      "spoiler_text": "",
      "visibility": "public",
      "language": "en",
      "uri": "https:\/\/pixelfed.social\/p\/ibon\/174671664158740480",
      "url": "https:\/\/pixelfed.social\/p\/ibon\/174671664158740480",
      "replies_count": 0,
      "reblogs_count": 0,
      "favourites_count": 0,
      "reblogged": false,
      "favourited": false,
      "muted": false,
      "bookmarked": false,
      "pinned": false,
      "content": "So calming ❤️",
      "reblog": null,
      "application": {
        "name": "web",
        "website": null
      },
      "mentions": [],
      "tags": [],
      "emojis": [],
      "card": null,
      "poll": null,
      "account": {
        "id": "172618787449868288",
        "username": "ibon",
        "acct": "ibon",
        "display_name": "ibon",
        "locked": false,
        "created_at": "2020-05-31T08:05:26.000000Z",
        "followers_count": 3,
        "following_count": 5,
        "statuses_count": 5,
        "note": "oc memes cha cha real smooth",
        "url": "https:\/\/pixelfed.social\/ibon",
        "avatar": "https:\/\/pixelfed.social\/storage\/avatars\/017\/261\/878\/744\/986\/828\/8\/SUFX3lFK91aQMF34GPc3_avatar.jpeg?v=2",
        "avatar_static": "https:\/\/pixelfed.social\/storage\/avatars\/017\/261\/878\/744\/986\/828\/8\/SUFX3lFK91aQMF34GPc3_avatar.jpeg?v=2",
        "header": "",
        "header_static": "",
        "emojis": [],
        "moved": null,
        "fields": null,
        "bot": false,
        "software": "pixelfed",
        "is_admin": false
      }
    }
  }
@dansup dansup added the 🔃 API For accessing Pixelfed data label Jun 7, 2020
@dansup dansup closed this as completed in 6300789 Jun 16, 2020
hnrd pushed a commit to hnrd/pixelfed that referenced this issue May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔃 API For accessing Pixelfed data
Projects
None yet
Development

No branches or pull requests

2 participants