Allow meta description in ActivityPub posts

This commit is contained in:
octospacc 2023-05-03 17:52:39 +02:00
parent e33e8c8273
commit 1e07f92452
1 changed files with 4 additions and 1 deletions

View File

@ -83,7 +83,10 @@ def MastodonShare(Flags:dict, Pages:list, Locale:dict):
for Cat in Meta['Categories']:
Hashtags += f' #{Cat.replace("-", "")}'
Hashtags = '\n\n' + Hashtags.strip()
Desc = LimitText(HtmlParagraphsToText(ContentHTML, '\n'), NoteLimit - len(Read) - UrlLen - len(Hashtags))
Desc = Meta['Description']
if not Desc:
Desc = HtmlParagraphsToText(ContentHTML, '\n')
Desc = LimitText(Desc, NoteLimit - len(Read) - UrlLen - len(Hashtags))
if not SaidPosting:
logging.info("Posting to Mastodon")