0
0
Fork 0

Admin interface for listing, adding and removing custom emojis (#5002)

* Admin interface for listing, adding and removing custom emojis

* Only display local ones in the list
This commit is contained in:
Eugen Rochko 2017-09-19 03:52:38 +02:00 committed by GitHub
parent d43944143a
commit 09a94b575e
8 changed files with 91 additions and 0 deletions

View file

@ -26,6 +26,7 @@ class BlockDomainService < BaseService
def clear_media!
clear_account_images
clear_account_attachments
clear_emojos
end
def suspend_accounts!
@ -51,6 +52,10 @@ class BlockDomainService < BaseService
end
end
def clear_emojos
emojis_from_blocked_domains.destroy_all
end
def blocked_domain
domain_block.domain
end
@ -62,4 +67,8 @@ class BlockDomainService < BaseService
def media_from_blocked_domain
MediaAttachment.joins(:account).merge(blocked_domain_accounts).reorder(nil)
end
def emojis_from_blocked_domains
CustomEmoji.where(domain: blocked_domain)
end
end