about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-18 23:14:41 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-18 23:14:41 +0100
commit882de42bab197e4d6b7b8acf327e72a240eda76d (patch)
tree8b7b12a36a93ebfe36dd326584945a8ea2f05e92 /app
parent7b7bf834e9f8616440259fcee518fa11adf3e457 (diff)
Validate presence of text even for remote statuses
Diffstat (limited to 'app')
-rw-r--r--app/models/status.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 56f52975d..a5c3e19ba 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -19,6 +19,7 @@ class Status < ApplicationRecord
   validates :account, presence: true
   validates :uri, uniqueness: true, unless: 'local?'
   validates :text, presence: true, length: { maximum: 500 }, if: proc { |s| s.local? && !s.reblog? }
+  validates :text, presence: true, if: proc { |s| !s.local? && !s.reblog? }
   validates :reblog, uniqueness: { scope: :account, message: 'of status already exists' }, if: 'reblog?'
 
   default_scope { order('id desc') }