]> cat aescling's git repositories - mastodon.git/commitdiff
Fix emoji update date processing (#9255)
authorThibG <thib@sitedethib.com>
Sat, 10 Nov 2018 22:59:51 +0000 (23:59 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 10 Nov 2018 22:59:51 +0000 (23:59 +0100)
app/lib/activitypub/activity/create.rb
app/services/activitypub/process_account_service.rb

index 45079e2b3cf6747f15c029611e6509445decf1de..9d2ddd3f6e51985e93856f9dfaf4abdb7082fc11 100644 (file)
@@ -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
index c77858f1df8130c5aaed9c251a3c11dd54a268b9..5c865dae2f4760acb3ca709a8fe431c6f2fc1b3d 100644 (file)
@@ -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