New API: GET /api/v1/custom_emojis to get a server's custom emojis (#5051)
This commit is contained in:
parent
9c8e602163
commit
293972f716
7 changed files with 43 additions and 12 deletions
|
@ -26,6 +26,8 @@ class CustomEmoji < ApplicationRecord
|
|||
validates_attachment :image, content_type: { content_type: 'image/png' }, presence: true, size: { in: 0..50.kilobytes }
|
||||
validates :shortcode, uniqueness: { scope: :domain }, format: { with: /\A#{SHORTCODE_RE_FRAGMENT}\z/ }, length: { minimum: 2 }
|
||||
|
||||
scope :local, -> { where(domain: nil) }
|
||||
|
||||
include Remotable
|
||||
|
||||
class << self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue