From 1a50509465a043e35659ba5cb1be9ebdbab234ff Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:40:03 +1300 Subject: [PATCH] improve compatibility with python 3.11 refs #36 --- app/activitypub/util.py | 2 +- app/templates/admin/activities.html | 2 +- app/templates/admin/communities.html | 2 +- app/templates/admin/reports.html | 2 +- app/templates/admin/users.html | 2 +- app/templates/community/community.html | 4 ++-- app/templates/domain/domain.html | 2 +- app/templates/index.html | 2 +- app/templates/topic/show_topic.html | 4 ++-- app/templates/user/show_profile.html | 4 ++-- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/activitypub/util.py b/app/activitypub/util.py index 1ba0c9aa..3563f25d 100644 --- a/app/activitypub/util.py +++ b/app/activitypub/util.py @@ -130,7 +130,7 @@ def post_to_activity(post: Post, community: Community): "mediaType": "text/markdown" }, "attachment": [], - "commentsEnabled": True, + "commentsEnabled": post.comments_enabled, "sensitive": post.nsfw or post.nsfl, "published": ap_datetime(post.created_at), "audience": f"https://{current_app.config['SERVER_NAME']}/c/{community.name}" diff --git a/app/templates/admin/activities.html b/app/templates/admin/activities.html index c848f3f9..8f1c1372 100644 --- a/app/templates/admin/activities.html +++ b/app/templates/admin/activities.html @@ -20,7 +20,7 @@
{{ _('No posts in this community yet.') }}
@@ -74,7 +74,7 @@{{ _('No posts in this community yet.') }}
diff --git a/app/templates/domain/domain.html b/app/templates/domain/domain.html index b058ebc0..aced33eb 100644 --- a/app/templates/domain/domain.html +++ b/app/templates/domain/domain.html @@ -13,7 +13,7 @@{{ _('No posts in this domain yet.') }}
diff --git a/app/templates/index.html b/app/templates/index.html index b1b6019a..d4d861ea 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -6,7 +6,7 @@{{ _('No posts yet. Join some communities to see more.') }}
diff --git a/app/templates/topic/show_topic.html b/app/templates/topic/show_topic.html index e5e033cc..52e3db7e 100644 --- a/app/templates/topic/show_topic.html +++ b/app/templates/topic/show_topic.html @@ -17,7 +17,7 @@ {% include "community/_community_nav.html" %} {% if post_layout == 'masonry' or post_layout == 'masonry_wide' %}{{ _('No posts in this topic yet.') }}
@@ -25,7 +25,7 @@{{ _('No posts in this topic yet.') }}
diff --git a/app/templates/user/show_profile.html b/app/templates/user/show_profile.html index f4ffb14a..e2a0be64 100644 --- a/app/templates/user/show_profile.html +++ b/app/templates/user/show_profile.html @@ -56,7 +56,7 @@ {% if posts %}