Merge branch 'master' into glitch-soc/merge-upstream

Conflicts:
- `app/controllers/statuses_controller.rb`:
  Minor conflict due to theming system
This commit is contained in:
Thibaut Girka
2020-01-24 14:37:06 +01:00
251 changed files with 2910 additions and 770 deletions

View File

@ -142,6 +142,7 @@ class MediaAttachment < ApplicationRecord
validates :account, presence: true
validates :description, length: { maximum: MAX_DESCRIPTION_LENGTH }, if: :local?
validates :file, presence: true, if: :local?
scope :attached, -> { where.not(status_id: nil).or(where.not(scheduled_status_id: nil)) }
scope :unattached, -> { where(status_id: nil, scheduled_status_id: nil) }