about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-09-17 22:21:57 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-09-17 15:21:57 +0200
commitdd6f9a1b827226346d0fff22a79538351fb33028 (patch)
tree0d9f897f78480fea05b6cf626d855767e45c0397 /app
parent3f07f1b2b18affd0c48f3673d124cfbea6b9e380 (diff)
Validate uri presence for remote status (#4985)
Diffstat (limited to 'app')
-rw-r--r--app/models/status.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 8e82c6aa6..2a2cdcf6e 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -55,7 +55,7 @@ class Status < ApplicationRecord
   has_one :notification, as: :activity, dependent: :destroy
   has_one :stream_entry, as: :activity, inverse_of: :status
 
-  validates :uri, uniqueness: true, unless: :local?
+  validates :uri, uniqueness: true, presence: true, unless: :local?
   validates :text, presence: true, unless: :reblog?
   validates_with StatusLengthValidator
   validates :reblog, uniqueness: { scope: :account }, if: :reblog?