This commit is contained in:
mgabdev
2020-05-01 01:50:27 -04:00
parent c15d4f12dc
commit 8e349c368c
99 changed files with 1268 additions and 887 deletions

View File

@@ -104,7 +104,8 @@ class MediaAttachment < ApplicationRecord
validates :account, presence: true
validates :description, length: { maximum: 420 }, 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) }
scope :local, -> { where(remote_url: '') }

View File

@@ -351,7 +351,7 @@ class Status < ApplicationRecord
apply_timeline_filters(query, account, local_only)
end
def as_tag_timeline(tag, account = nil, local_only = false)
def as_tag_timeline(tag, account = nil, local_only = true)
query = timeline_scope(local_only).tagged_with(tag).without_replies
apply_timeline_filters(query, account, local_only)