|
|
|
|
@ -45,7 +45,7 @@ module Account::Interactions
|
|
|
|
|
|
|
|
|
|
def follow!(other_account, reblogs: nil, notify: nil, languages: nil, uri: nil, rate_limit: false, bypass_limit: false)
|
|
|
|
|
rel = active_relationships.create_with(show_reblogs: reblogs.nil? || reblogs, notify: notify.nil? ? false : notify, languages: languages, uri: uri, rate_limit: rate_limit, bypass_follow_limit: bypass_limit)
|
|
|
|
|
.find_or_create_by!(target_account: other_account)
|
|
|
|
|
.find_or_create_by!(target_account: other_account)
|
|
|
|
|
|
|
|
|
|
rel.show_reblogs = reblogs unless reblogs.nil?
|
|
|
|
|
rel.notify = notify unless notify.nil?
|
|
|
|
|
@ -58,7 +58,7 @@ module Account::Interactions
|
|
|
|
|
|
|
|
|
|
def request_follow!(other_account, reblogs: nil, notify: nil, languages: nil, uri: nil, rate_limit: false, bypass_limit: false)
|
|
|
|
|
rel = follow_requests.create_with(show_reblogs: reblogs.nil? || reblogs, notify: notify.nil? ? false : notify, uri: uri, languages: languages, rate_limit: rate_limit, bypass_follow_limit: bypass_limit)
|
|
|
|
|
.find_or_create_by!(target_account: other_account)
|
|
|
|
|
.find_or_create_by!(target_account: other_account)
|
|
|
|
|
|
|
|
|
|
rel.show_reblogs = reblogs unless reblogs.nil?
|
|
|
|
|
rel.notify = notify unless notify.nil?
|
|
|
|
|
@ -71,7 +71,7 @@ module Account::Interactions
|
|
|
|
|
|
|
|
|
|
def block!(other_account, uri: nil)
|
|
|
|
|
block_relationships.create_with(uri: uri)
|
|
|
|
|
.find_or_create_by!(target_account: other_account)
|
|
|
|
|
.find_or_create_by!(target_account: other_account)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def mute!(other_account, notifications: nil, duration: 0)
|
|
|
|
|
@ -215,14 +215,14 @@ module Account::Interactions
|
|
|
|
|
|
|
|
|
|
def followers_for_local_distribution
|
|
|
|
|
followers.local
|
|
|
|
|
.joins(:user)
|
|
|
|
|
.merge(User.signed_in_recently)
|
|
|
|
|
.joins(:user)
|
|
|
|
|
.merge(User.signed_in_recently)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def lists_for_local_distribution
|
|
|
|
|
scope = lists.joins(account: :user)
|
|
|
|
|
scope.where.not(list_accounts: { follow_id: nil }).or(scope.where(account_id: id))
|
|
|
|
|
.merge(User.signed_in_recently)
|
|
|
|
|
.merge(User.signed_in_recently)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def remote_followers_hash(url)
|
|
|
|
|
|