main
Bob Mottram 2022-09-03 17:19:09 +01:00
parent f585592d7c
commit fb8b19aaef
1 changed files with 5 additions and 7 deletions

View File

@ -742,8 +742,8 @@ def post_tag_exists(tagType: str, tagName: str, tags: {}) -> bool:
return False return False
def _add_mention(word_str: str, http_prefix: str, following: str, def _add_mention(word_str: str, http_prefix: str, following: [],
petnames: str, replace_mentions: {}, petnames: [], replace_mentions: {},
recipients: [], tags: {}) -> bool: recipients: [], tags: {}) -> bool:
"""Detects mentions and adds them to the replacements dict and """Detects mentions and adds them to the replacements dict and
recipients list recipients list
@ -771,8 +771,7 @@ def _add_mention(word_str: str, http_prefix: str, following: str,
'type': 'Mention' 'type': 'Mention'
} }
replace_mentions[word_str] = \ replace_mentions[word_str] = \
"<span class=\"h-card\"><a href=\"" + http_prefix + \ "<span class=\"h-card\"><a href=\"" + recipient_actor + \
"://" + replace_domain + "/@" + possible_nickname + \
"\" tabindex=\"10\" class=\"u-url mention\">@<span>" + \ "\" tabindex=\"10\" class=\"u-url mention\">@<span>" + \
possible_nickname + "</span></a></span>" possible_nickname + "</span></a></span>"
return True return True
@ -798,9 +797,8 @@ def _add_mention(word_str: str, http_prefix: str, following: str,
'type': 'Mention' 'type': 'Mention'
} }
replace_mentions[word_str] = \ replace_mentions[word_str] = \
"<span class=\"h-card\"><a href=\"" + http_prefix + \ "<span class=\"h-card\"><a href=\"" + \
"://" + replace_domain + "/@" + replace_nickname + \ recipient_actor + "\" tabindex=\"10\" " + \
"\" tabindex=\"10\" " + \
"class=\"u-url mention\">@<span>" + \ "class=\"u-url mention\">@<span>" + \
replace_nickname + "</span></a></span>" replace_nickname + "</span></a></span>"
return True return True