Validate uri presence for remote status (#4985)
This commit is contained in:
parent
3f07f1b2b1
commit
dd6f9a1b82
2 changed files with 9 additions and 1 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue