Raise exception when attempting to serialize local-only statuses
This commit is contained in:
		@@ -25,6 +25,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
 | 
				
			|||||||
  attribute :closed, if: :poll_and_expired?
 | 
					  attribute :closed, if: :poll_and_expired?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def id
 | 
					  def id
 | 
				
			||||||
 | 
					    raise Mastodon::NotPermittedError, 'Local-only statuses should not be serialized' if object.local_only?
 | 
				
			||||||
    ActivityPub::TagManager.instance.uri_for(object)
 | 
					    ActivityPub::TagManager.instance.uri_for(object)
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user