Notifications endpoint returns invalid account attribute for notification item when user has been deleted
api/v1/notifications
returns invalid account attribute for notification item when the original user has been deleted from their corresponding instance since the notification was created.
Steps to replicate:
- Create User A on Instance 1, and User B on Instance 2.
- Send a direct message to User B from User A.
- As admin of Instance 1, delete User A.
- Fetch User B's notifications using
api/v1/notifications
endpoint, observe empty accounts object in JSON response.
Mastodon API indicates that the accounts object should not be null, so clients will not be expecting a null response (e.g. crash observed in Roma).
Sample response:
[
{
"account": {},
"created_at": "2019-07-12T15:14:15.000Z",
"id": "304803",
"pleroma": {
"is_seen": false
},
...
"type": "mention"
}
]