bookwyrm-social / bookwyrm

Social reading and reviewing, decentralized with ActivityPub
http://joinbookwyrm.com/
Other
2.23k stars 263 forks source link

update inventaire.io connector get_description #3145

Open maxlath opened 9 months ago

maxlath commented 9 months ago

Hi!

https://github.com/bookwyrm-social/bookwyrm/blob/193a36390b1e3ec04d757f167a6f3befdff694d0/bookwyrm/connectors/inventaire.py#L222-L227

In the code above, links used to be a dictionary of strings (ex: { enwiki: 'Peter Kropotkin' }), but inventaire.io now returns a richer sitelink object: { enwiki: { title: 'Peter Kropotkin', badges: []} } (to let consumers filter-out sitelinks with special badges such as redirection sitelinks), so the request to /api/data?action=wp-extract fails, as it tries to pass { title: 'Peter Kropotkin', badges: []} as title.

mouse-reeve commented 9 months ago

Thank you so much for letting me know!

maxlath commented 9 months ago

You're welcome! I didn't think that breaking change was affecting other services before I saw the errors in the inventaire.io server logs :sweat_smile: Hopefully, we get better at communicating future breaking changes, if any.