fix max chars to 1024
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				PR Needs Rebase / label-rebase-needed (push) Has been cancelled
				
					
					
				
			
		
			
				
	
				Build nightly container image / compute-suffix (push) Has been cancelled
				
					
					
				
			
		
			
				
	
				Build nightly container image / build-image (push) Has been cancelled
				
					
					
				
			
		
			
				
	
				Build nightly container image / build-image-streaming (push) Has been cancelled
				
					
					
				
			
		
			
				
	
				Crowdin / Download translations / download-translations (push) Has been cancelled
				
					
					
				
			
		
			
				
	
				Bundler Audit / security (push) Has been cancelled
				
					
					
				
			
		
			
				
	
				CodeQL / Analyze (javascript) (push) Has been cancelled
				
					
					
				
			
		
			
				
	
				CodeQL / Analyze (ruby) (push) Has been cancelled
				
					
					
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	PR Needs Rebase / label-rebase-needed (push) Has been cancelled
				Build nightly container image / compute-suffix (push) Has been cancelled
				Build nightly container image / build-image (push) Has been cancelled
				Build nightly container image / build-image-streaming (push) Has been cancelled
				Crowdin / Download translations / download-translations (push) Has been cancelled
				Bundler Audit / security (push) Has been cancelled
				CodeQL / Analyze (javascript) (push) Has been cancelled
				CodeQL / Analyze (ruby) (push) Has been cancelled
				This commit is contained in:
		@@ -12,7 +12,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
 | 
			
		||||
 | 
			
		||||
  attributes :domain, :title, :version, :source_url, :description,
 | 
			
		||||
             :usage, :thumbnail, :icon, :languages, :configuration,
 | 
			
		||||
             :registrations, :api_versions
 | 
			
		||||
             :registrations, :api_versions, :max_toot_chars
 | 
			
		||||
 | 
			
		||||
  has_one :contact, serializer: ContactSerializer
 | 
			
		||||
  has_many :rules, serializer: REST::RuleSerializer
 | 
			
		||||
@@ -119,6 +119,10 @@ class REST::InstanceSerializer < ActiveModel::Serializer
 | 
			
		||||
    Mastodon::Version.api_versions
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def max_toot_chars
 | 
			
		||||
    StatusLengthValidator::MAX_CHARS
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  private
 | 
			
		||||
 | 
			
		||||
  def registrations_enabled?
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
class StatusLengthValidator < ActiveModel::Validator
 | 
			
		||||
  MAX_CHARS = 500
 | 
			
		||||
  MAX_CHARS = 1024
 | 
			
		||||
  URL_PLACEHOLDER_CHARS = 23
 | 
			
		||||
  URL_PLACEHOLDER = 'x' * 23
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user