Skip to content

Commit

Permalink
tootctl emoji import: case insensitive duplicate check (mastodon#15738)
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan authored and ClearlyClaire committed Jan 28, 2022
1 parent fc4b985 commit 0951c69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mastodon/emoji_cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def import(path)
next if filename.start_with?('._')

shortcode = [options[:prefix], filename, options[:suffix]].compact.join
custom_emoji = CustomEmoji.local.find_by(shortcode: shortcode)
custom_emoji = CustomEmoji.local.find_by("LOWER(shortcode) = ?", shortcode.downcase)

if custom_emoji && !options[:overwrite]
skipped += 1
Expand Down

0 comments on commit 0951c69

Please sign in to comment.