Add emoji alias-names support
This commit is contained in:
parent
dd05f2b58c
commit
8638e715cb
9 changed files with 42 additions and 6 deletions
|
@ -6,7 +6,7 @@ class Form::CustomEmojiBatch
|
|||
include AccountableConcern
|
||||
|
||||
attr_accessor :custom_emoji_ids, :action, :current_account,
|
||||
:category_id, :category_name, :visible_in_picker
|
||||
:category_id, :category_name, :aliases_raw, :visible_in_picker
|
||||
|
||||
def save
|
||||
case action
|
||||
|
@ -43,7 +43,8 @@ class Form::CustomEmojiBatch
|
|||
end
|
||||
|
||||
custom_emojis.each do |custom_emoji|
|
||||
custom_emoji.update(category_id: category&.id)
|
||||
new_aliases_raw = (aliases_raw.presence || custom_emoji.aliases_raw)
|
||||
custom_emoji.update(category_id: category&.id, aliases_raw: new_aliases_raw)
|
||||
log_action :update, custom_emoji
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue