kopia lustrzana https://github.com/snarfed/bridgy-fed
RSS feed bug fix
fixes https://console.cloud.google.com/errors/detail/CJe5pdyJufvpHQ;time=P30D?project=bridgy-federatedpull/676/head
rodzic
75c68d4c88
commit
023b05e216
13
pages.py
13
pages.py
|
@ -216,11 +216,6 @@ def serve_feed(*, objects, format, title):
|
||||||
|
|
||||||
tasklets.wait_all(gets)
|
tasklets.wait_all(gets)
|
||||||
|
|
||||||
actor = {
|
|
||||||
'displayName': id,
|
|
||||||
'url': g.user.web_url(),
|
|
||||||
}
|
|
||||||
|
|
||||||
# TODO: inject/merge common.pretty_link into microformats2.render_content
|
# TODO: inject/merge common.pretty_link into microformats2.render_content
|
||||||
# (specifically into hcard_to_html) somehow to convert Mastodon URLs to @-@
|
# (specifically into hcard_to_html) somehow to convert Mastodon URLs to @-@
|
||||||
# syntax. maybe a fediverse kwarg down through the call chain?
|
# syntax. maybe a fediverse kwarg down through the call chain?
|
||||||
|
@ -228,12 +223,12 @@ def serve_feed(*, objects, format, title):
|
||||||
entries = [microformats2.object_to_html(a) for a in activities]
|
entries = [microformats2.object_to_html(a) for a in activities]
|
||||||
return render_template('feed.html', **TEMPLATE_VARS, **locals())
|
return render_template('feed.html', **TEMPLATE_VARS, **locals())
|
||||||
elif format == 'atom':
|
elif format == 'atom':
|
||||||
body = atom.activities_to_atom(activities, actor=actor, title=title,
|
body = atom.activities_to_atom(activities, actor=g.user.obj.as1,
|
||||||
request_url=request.url)
|
title=title, request_url=request.url)
|
||||||
return body, {'Content-Type': atom.CONTENT_TYPE}
|
return body, {'Content-Type': atom.CONTENT_TYPE}
|
||||||
elif format == 'rss':
|
elif format == 'rss':
|
||||||
body = rss.from_activities(activities, actor=actor, title=title,
|
body = rss.from_activities(activities, actor=g.user.obj.as1,
|
||||||
feed_url=request.url)
|
title=title, feed_url=request.url)
|
||||||
return body, {'Content-Type': rss.CONTENT_TYPE}
|
return body, {'Content-Type': rss.CONTENT_TYPE}
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue