Skip to content
Snippets Groups Projects
Commit 7f5a4be5 authored by ThibG's avatar ThibG Committed by Eugen Rochko
Browse files

Fix emoji update date processing (#9255)

parent 9b89c62d
No related branches found
No related tags found
No related merge requests found
......@@ -177,7 +177,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
updated = tag['updated']
emoji = CustomEmoji.find_by(shortcode: shortcode, domain: @account.domain)
return unless emoji.nil? || image_url != emoji.image_remote_url || (updated && emoji.updated_at >= updated)
return unless emoji.nil? || image_url != emoji.image_remote_url || (updated && updated >= emoji.updated_at)
emoji ||= CustomEmoji.new(domain: @account.domain, shortcode: shortcode, uri: uri)
emoji.image_remote_url = image_url
......
......@@ -232,7 +232,7 @@ class ActivityPub::ProcessAccountService < BaseService
updated = tag['updated']
emoji = CustomEmoji.find_by(shortcode: shortcode, domain: @account.domain)
return unless emoji.nil? || image_url != emoji.image_remote_url || (updated && emoji.updated_at >= updated)
return unless emoji.nil? || image_url != emoji.image_remote_url || (updated && updated >= emoji.updated_at)
emoji ||= CustomEmoji.new(domain: @account.domain, shortcode: shortcode, uri: uri)
emoji.image_remote_url = image_url
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment