mastodon
mastodon copied to clipboard
API: ScheduledStatus serializer returns application ID (as integer)
Steps to reproduce the problem
GET /api/v1/scheduled_statuses or POST /api/v1/statuses?scheduled_at=...&...
Expected behaviour
application ID is returned as a string or not at all
Actual behaviour
application ID is returned as an integer
Detailed description
https://github.com/mastodon/mastodon/blob/cec1e902e006730f68bde0a4334e5b819a12a475/app/serializers/rest/scheduled_status_serializer.rb#L13
The line above implies that the application_id should not be returned, but it is:
{
"id": "1",
"scheduled_at": "2022-11-30T00:00:00.000Z",
"params": {
"text": "test post",
"media_ids": null,
"sensitive": null,
"spoiler_text": null,
"visibility": null,
"language": null,
"scheduled_at": null,
"poll": null,
"idempotency": null,
"with_rate_limit": false,
"in_reply_to_id": null,
"application_id": 2
},
"media_attachments": []
}
Specifications
main
For that matter, should params[scheduled_at] be returned either? And why is it null?
And the in_reply_to_id is also an integer, when status IDs are supposed to be strings in theory