beatonma / django-wm

Automatic Webmention functionality for Django models
https://beatonma.org/webmentions_tester/
GNU General Public License v3.0
12 stars 2 forks source link

Clean Install Breaks Incoming Webmentions #53

Closed campegg closed 7 months ago

campegg commented 7 months ago

From v2.0.0 onwards, mf2py supports img alt text by default, which breaks incoming webmentions, since (I think!) the line hcard.avatar = urljoin(source_url, hcard.avatar) in mentions/tasks/incoming/remote.py expects source_url to be a string, but is being passed an object with value and alt instead of just the URL string. Trying to parse incoming webmentions throws TypeError: Cannot mix str and non-str arguments (see stack trace below).

The current requirements (mf2py>=1.1.2) will mean a clean install of django-wm will default to the latest version (currently 2.0.1). Downgrading to version 1.1.3 does solve the problem, however.

stack_trace.md

beatonma commented 7 months ago

Thank you - fix available in release 4.0.4.

campegg commented 7 months ago

Thank you, @beatonma—really appreciate the quick fix!

beatonma commented 7 months ago

(Not that quick - I came across and fixed tthis ~6 weeks ago while adding something for the next release but neglected to publish it :$)