Fix #329 - avatar errors no longer prevent remote accounts from being saved
(without avatar). Also improved search position of exact matches
This commit is contained in:
parent
2b2797d6a5
commit
58b3f4fd67
7 changed files with 46 additions and 26 deletions
|
@ -29,7 +29,8 @@ class Status < ApplicationRecord
|
|||
|
||||
default_scope { order('id desc') }
|
||||
|
||||
scope :with_counters, -> { select('statuses.*, (select count(r.id) from statuses as r where r.reblog_of_id = statuses.id) as reblogs_count, (select count(f.id) from favourites as f where f.status_id = statuses.id) as favourites_count') }
|
||||
scope :remote, -> { where.not(uri: nil) }
|
||||
scope :local, -> { where(uri: nil) }
|
||||
|
||||
cache_associated :account, :media_attachments, :tags, :stream_entry, mentions: :account, reblog: [:account, :stream_entry, :tags, :media_attachments, mentions: :account], thread: :account
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue