From 7a0dc34cad955fecba8072f5ed3c179ba5a3fd98 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 18 May 2019 13:03:36 -0500 Subject: reimplement monsterpit bbcode and markdown extensions on top of new glitch-soc formatting system + bbcode feature parity + new `i:am` footer + set content type from `format` bangtag --- app/models/status.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/models') diff --git a/app/models/status.rb b/app/models/status.rb index 0de92e0c6..895ac8fd6 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -23,11 +23,12 @@ # in_reply_to_account_id :bigint(8) # local_only :boolean # poll_id :bigint(8) -# content_type :string # tsv :tsvector # curated :boolean default(FALSE), not null # sharekey :string # network :boolean default(FALSE), not null +# content_type :string +# footer :text # class Status < ApplicationRecord @@ -81,7 +82,7 @@ class Status < ApplicationRecord validates_with DisallowedHashtagsValidator validates :reblog, uniqueness: { scope: :account }, if: :reblog? validates :visibility, exclusion: { in: %w(direct limited) }, if: :reblog? - validates :content_type, inclusion: { in: %w(text/plain text/markdown text/html) }, allow_nil: true + validates :content_type, inclusion: { in: %w(text/plain text/markdown text/x-bbcode text/x-bbcode+markdown text/html) }, allow_nil: true accepts_nested_attributes_for :poll -- cgit