Merge branch 'master' into fix/cache_blocking
This commit is contained in:
commit
acd33101c5
48 changed files with 453 additions and 184 deletions
|
@ -3,6 +3,8 @@
|
|||
class DomainBlock < ApplicationRecord
|
||||
enum severity: [:silence, :suspend]
|
||||
|
||||
attr_accessor :retroactive
|
||||
|
||||
validates :domain, presence: true, uniqueness: true
|
||||
|
||||
def self.blocked?(domain)
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import < ApplicationRecord
|
||||
FILE_TYPES = ['text/plain', 'text/csv'].freeze
|
||||
|
||||
self.inheritance_column = false
|
||||
|
||||
belongs_to :account, required: true
|
||||
|
||||
enum type: [:following, :blocking, :muting]
|
||||
|
||||
belongs_to :account
|
||||
|
||||
FILE_TYPES = ['text/plain', 'text/csv'].freeze
|
||||
validates :type, presence: true
|
||||
|
||||
has_attached_file :data, url: '/system/:hash.:extension', hash_secret: ENV['PAPERCLIP_SECRET']
|
||||
validates_attachment_content_type :data, content_type: FILE_TYPES
|
||||
|
|
|
@ -110,6 +110,10 @@ class Status < ApplicationRecord
|
|||
results
|
||||
end
|
||||
|
||||
def non_sensitive_with_media?
|
||||
!sensitive? && media_attachments.any?
|
||||
end
|
||||
|
||||
class << self
|
||||
def as_home_timeline(account)
|
||||
where(account: [account] + account.following)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue