Custom emoji support
This commit is contained in:
parent
5b025a8e45
commit
09ce33579a
17 changed files with 357 additions and 70 deletions
|
@ -8,6 +8,7 @@ from app import webfinger
|
|||
from app.actor import Actor
|
||||
from app.actor import fetch_actor
|
||||
from app.config import BASE_URL
|
||||
from app.utils import emoji
|
||||
|
||||
|
||||
def _set_a_attrs(attrs, new=False):
|
||||
|
@ -78,5 +79,10 @@ def markdownify(
|
|||
if mentionify:
|
||||
content, mention_tags, mentioned_actors = _mentionify(db, content)
|
||||
tags.extend(mention_tags)
|
||||
|
||||
# Handle custom emoji
|
||||
tags.extend(emoji.tags(content))
|
||||
|
||||
content = markdown(content, extensions=["mdx_linkify"])
|
||||
|
||||
return content, tags, mentioned_actors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue