@Packbat yeah you'd just add a validation step in PostStatusService.call and the logic fur that---while i couldn't write right now off the top of my head---should be pretty simple. you might need a unicode/emoji library
if you look at fur example, PostStatusService.validate_media!
, invoked at line 43, defined here, it just throws Mastodon::ValidationError
s (implicitly forcing post creation to fail) as required; you'd just do a check fur whether there’s a non-emoji and throw as needed
@Packbat i am assuming doing such a check is easy ofc but i can't imagine it wouldn't be
@aescling cool! guessing it would be a little trickier to allow custom emojis, but probably also possible to write a check that covers that
@Packbat custom emoji are really just :single_words_between_colons:
so the only maybe tricky part is making sure the instance actually has an emojo fur any instance of a :single_word_between_colons:
(you don't want to allow such text to pass through otherwise, you know?)
@Packbat oh wait no i furgot, custom emoji are always tagged in a post by the backend (statuses are serialized to the client alongside the info necessary to replace all custom emojim with their assoicated images), so there is definitely a step where you have all the emojim that the status have available to check, so making sure you do this right should be easy
@aescling nice!
@aescling 👍🏽 ❗