Notifications crashes with a `move` type
Hi, might be an issue in the backend not returning the data properly but here goes of what I've noticed in FE.
Backend version: 2.3.0-1-gb221d77a (from OTP)
Frontend version: aacd9098
My notifications weren't loading at all and I got a popup saying Error fetching notifications: Cannot read property 'includes' of undefined
.
So I went and removed the .catch() so I get a proper output in my console and noticed that in entity_normalizer.service.js
it was crashing at output.screen_name.includes('@')
(line 208).
To continue to debug, I've changed that line to if (output.screen_name && output.screen_name.includes('@'))
and here's the faulty notification:
Openning that profile doesn't shows that they moved tho.
Here's a copy of that object as /api/v1/notifications
returns:
{
"account": {
"acct": "outadoc@mastodon.social",
"avatar": "https://pl.im-in.space/proxy/sUzS-oIz_8oqU0TUwW91oo4FK5Y/aHR0cHM6Ly9maWxlcy5tYXN0b2Rvbi5zb2NpYWwvYWNjb3VudHMvYXZhdGFycy8wMDAvNDc5LzY3Ny9vcmlnaW5hbC9kM2ZkY2U0OTFjMjQ3NWQ4LnBuZw/d3fdce491c2475d8.png",
"avatar_static": "https://pl.im-in.space/proxy/sUzS-oIz_8oqU0TUwW91oo4FK5Y/aHR0cHM6Ly9maWxlcy5tYXN0b2Rvbi5zb2NpYWwvYWNjb3VudHMvYXZhdGFycy8wMDAvNDc5LzY3Ny9vcmlnaW5hbC9kM2ZkY2U0OTFjMjQ3NWQ4LnBuZw/d3fdce491c2475d8.png",
"bot": false,
"created_at": "2018-10-30T09:25:00.000Z",
"display_name": "HTCPCP/1.0 ☕️",
"emojis": [],
"fields": [],
"followers_count": 3,
"following_count": 14,
"fqn": "outadoc@mastodon.social",
"header": "https://pl.im-in.space/images/banner.png",
"header_static": "https://pl.im-in.space/images/banner.png",
"id": "18521",
"locked": false,
"note": "<p>Cats, code, computers, cameras, cookies & coffee. Normand. He/him. Android developer working on cool stuff @Tapptic/@Bedrock_Stream, beep boop. Art: @makowwka.</p>",
"pleroma": {
"accepts_chat_messages": null,
"also_known_as": [],
"ap_id": "https://mastodon.social/users/outadoc",
"background_image": null,
"deactivated": false,
"favicon": null,
"hide_favorites": false,
"hide_followers": false,
"hide_followers_count": false,
"hide_follows": false,
"hide_follows_count": false,
"is_confirmed": true,
"relationship": {},
"skip_thread_containment": false,
"tags": []
},
"source": {
"fields": [],
"note": "",
"pleroma": {
"actor_type": "Person",
"discoverable": false
},
"sensitive": false
},
"statuses_count": 0,
"url": "https://mastodon.social/@outadoc",
"username": "outadoc"
},
"created_at": "2021-03-06T18:54:56.000Z",
"id": "3051",
"pleroma": {
"is_muted": false,
"is_seen": false
},
"target": {},
"type": "move"
}
Is target
at fault for being empty?