takahe/api/views/emoji.py
Andrew Godwin 4ad4f468a4 Refactor HTML rendering into one place
Also suppress using external <a> tags for now, until we can separate
them from hashtags properly.
2022-12-20 11:39:45 +00:00

8 lines
283 B
Python

from activities.models import Emoji
from api.schemas import CustomEmoji
from api.views.base import api_router
@api_router.get("/v1/custom_emojis", response=list[CustomEmoji])
def emojis(request):
return [e.to_mastodon_json() for e in Emoji.objects.usable().filter(local=True)]