Fix emoji update date processing (#9255)
This commit is contained in:
		
							parent
							
								
									d06a724b1c
								
							
						
					
					
						commit
						886ef1cc38
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue