Fixes featured hashtag setting page erroring out instead of rejecting invalid tags (#12436)
* Revert "Fix ignoring whole status because of one invalid hashtag (#11621)"
This reverts commit dff46b260b.
* Fix statuses being rejected because of invalid hashtag names
* Add spec for invalid hashtag names in statuses
* Add test for featured tags controller
			
			
This commit is contained in:
		@@ -157,7 +157,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
 | 
			
		||||
    return if tag['name'].blank?
 | 
			
		||||
 | 
			
		||||
    Tag.find_or_create_by_names(tag['name']) do |hashtag|
 | 
			
		||||
      @tags << hashtag unless @tags.include?(hashtag)
 | 
			
		||||
      @tags << hashtag unless @tags.include?(hashtag) || !hashtag.valid?
 | 
			
		||||
    end
 | 
			
		||||
  rescue ActiveRecord::RecordInvalid
 | 
			
		||||
    nil
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user