add diaspora style markdown for mentions in source content

jsonld-outbound
Alain St-Denis 2022-12-01 14:34:42 +00:00
rodzic 6002cd948b
commit 5cfcd96d2f
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -879,6 +879,8 @@ class Note(Object, RawContentMixin):
# only add AP profiles mentions
if getattr(profile, 'id', None):
self.tag_objects.append(Mention(href=profile.id, name='@'+mention))
# some platforms only render diaspora style markdown if it is available
self.source['content'] = self.source['content'].replace(mention, '{'+mention+'}')
def extract_mentions(self):
"""