mirror of
				https://github.com/discourse/discourse.git
				synced 2025-02-25 18:55:32 -06:00 
			
		
		
		
	FIX: TopicEmbed.import should update title and author
This commit is contained in:
		@@ -73,7 +73,13 @@ class TopicEmbed < ActiveRecord::Base
 | 
			
		||||
      post = embed.post
 | 
			
		||||
      # Update the topic if it changed
 | 
			
		||||
      if post && post.topic && content_sha1 != embed.content_sha1
 | 
			
		||||
        post.revise(user, { raw: absolutize_urls(url, contents) }, skip_validations: true, bypass_rate_limiter: true)
 | 
			
		||||
        post_revision_args = {
 | 
			
		||||
          raw: absolutize_urls(url, contents),
 | 
			
		||||
          user_id: user.id,
 | 
			
		||||
          title: title,
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        post.revise(user, post_revision_args, skip_validations: true, bypass_rate_limiter: true)
 | 
			
		||||
        embed.update_column(:content_sha1, content_sha1)
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user