accounts approved, video player testing, bookmark collections
This commit is contained in:
mgabdev
2020-12-17 01:34:00 -05:00
parent 04053c0e31
commit 5a37a7090e
88 changed files with 688 additions and 395 deletions

View File

@@ -7,6 +7,10 @@ module AccountAssociations
# Local users
has_one :user, inverse_of: :account, dependent: :destroy
# Chat
has_many :chat_messages, inverse_of: :account, dependent: :destroy
has_many :chat_conversation_accounts, inverse_of: :account, dependent: :destroy
# Timelines
has_many :statuses, inverse_of: :account, dependent: :destroy
has_many :favourites, inverse_of: :account, dependent: :destroy
@@ -14,9 +18,10 @@ module AccountAssociations
has_many :notifications, inverse_of: :account, dependent: :destroy
has_many :scheduled_statuses, inverse_of: :account, dependent: :destroy
# Pinned statuses
# Bookmarked statuses
has_many :status_bookmarks, inverse_of: :account, dependent: :destroy
has_many :bookmarked_statuses, -> { reorder('status_bookmarks.created_at DESC') }, through: :status_bookmarks, class_name: 'Status', source: :status
has_many :status_bookmark_collections, inverse_of: :account, dependent: :destroy
# Pinned statuses
has_many :status_pins, inverse_of: :account, dependent: :destroy
@@ -26,7 +31,7 @@ module AccountAssociations
has_many :media_attachments, dependent: :destroy
has_many :polls, dependent: :destroy
# PuSH subscriptions
# Push subscriptions
has_many :subscriptions, dependent: :destroy
# Report relationships

View File

@@ -77,12 +77,6 @@ module AccountInteractions
has_many :chat_blocking, -> { order('chat_blocks.id desc') }, through: :chat_block_relationships, source: :target_account
has_many :chat_blocked_by_relationships, class_name: 'ChatBlock', foreign_key: :target_account_id, dependent: :destroy
has_many :chat_blocked_by, -> { order('chat_blocks.id desc') }, through: :chat_blocked_by_relationships, source: :account
# Chat mute relationships
has_many :chat_mute_relationships, class_name: 'ChatMute', foreign_key: 'account_id', dependent: :destroy
has_many :chat_muting, -> { order('chat_mutes.id desc') }, through: :chat_mute_relationships, source: :target_account
has_many :chat_muted_by_relationships, class_name: 'ChatMute', foreign_key: :target_account_id, dependent: :destroy
has_many :chat_muted_by, -> { order('chat_mutes.id desc') }, through: :chat_muted_by_relationships, source: :account
end
def follow!(other_account, reblogs: nil, uri: nil)