From fee7d565f0d88d8359d75ef406ac0fae4baee5fe Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Fri, 8 Nov 2024 12:09:56 +0100 Subject: [PATCH] renamed _movedTo_name to movedToName and documented its use. --- README.md | 1 + pelican/plugins/activitypub/activitypub.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9b6be72..a7b3585 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ ACTIVITYPUB_AUTHORS = { 'alice': { 'name': 'Alice', 'movedTo': 'https://fedi.example/users/alice', + 'movedToName': '@alice@fedi.example', 'alsoKnownAs': ['https://fedi.example/users/alice'], 'summary': 'Hi, I\'m Alice! Please follow me at @alice@fedi.example.', 'attachment': [ diff --git a/pelican/plugins/activitypub/activitypub.py b/pelican/plugins/activitypub/activitypub.py index ea76717..168ab24 100644 --- a/pelican/plugins/activitypub/activitypub.py +++ b/pelican/plugins/activitypub/activitypub.py @@ -1,4 +1,3 @@ - import datetime import logging import json @@ -8,7 +7,6 @@ import pelican.writers from pelican import signals - log = logging.getLogger(__name__) @@ -148,7 +146,7 @@ def ap_article(generator: pelican.ArticlesGenerator, writer: pelican.writers.Wri tags.append({ 'type': 'Mention', 'href': aa['movedTo'], - 'name': aa['_movedTo_name'] + 'name': aa['movedToName'] }) cmap = {} tmap = {}