updated = tag['updated']
emoji = CustomEmoji.find_by(shortcode: shortcode, domain: @account.domain)
- return unless emoji.nil? || emoji.updated_at >= updated
+ return unless emoji.nil? || image_url != emoji.image_remote_url || (updated && emoji.updated_at >= updated)
emoji ||= CustomEmoji.new(domain: @account.domain, shortcode: shortcode, uri: uri)
emoji.image_remote_url = image_url
updated = tag['updated']
emoji = CustomEmoji.find_by(shortcode: shortcode, domain: @account.domain)
- return unless emoji.nil? || emoji.updated_at >= updated
+ return unless emoji.nil? || image_url != emoji.image_remote_url || (updated && emoji.updated_at >= updated)
emoji ||= CustomEmoji.new(domain: @account.domain, shortcode: shortcode, uri: uri)
emoji.image_remote_url = image_url