From 50dbe635970fac1f09481ca2e8fa14e49a673d64 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Nov 2021 15:27:23 +0000 Subject: [PATCH] Include extra tags within opengraph profile --- webapp_utils.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/webapp_utils.py b/webapp_utils.py index 3e4dd6f54..3041a46ac 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -703,6 +703,24 @@ def htmlHeaderWithPersonMarkup(cssFilename: str, instanceTitle: str, " \n" + \ " \n" + if actorJson.get('attachment'): + ogTags = ( + 'email', 'openpgp', 'blog', 'xmpp', 'matrix', 'briar', + 'jami', 'cwtch', 'languages' + ) + for attachJson in actorJson['attachment']: + if not attachJson.get('name'): + continue + if not attachJson.get('value'): + continue + name = attachJson['name'].lower() + value = attachJson['value'] + for ogTag in ogTags: + if name != ogTag: + continue + ogMetadata += \ + " \n" htmlStr = \ htmlHeaderWithExternalStyle(cssFilename, instanceTitle,