Progress on DMs
Progress on DMs
This commit is contained in:
@@ -12,6 +12,8 @@ class AccountRelationshipsPresenter
|
||||
@followed_by = cached[:followed_by].merge(Account.followed_by_map(@uncached_account_ids, @current_account_id))
|
||||
@blocking = cached[:blocking].merge(Account.blocking_map(@uncached_account_ids, @current_account_id))
|
||||
@blocked_by = cached[:blocked_by].merge(Account.blocked_by_map(@uncached_account_ids, @current_account_id))
|
||||
# @chat_blocking = cached[:chat_blocking].merge(Account.chat_blocking_map(@uncached_account_ids, @current_account_id))
|
||||
# @chat_blocked_by = cached[:chat_blocked_by].merge(Account.chat_blocked_by_map(@uncached_account_ids, @current_account_id))
|
||||
@muting = cached[:muting].merge(Account.muting_map(@uncached_account_ids, @current_account_id))
|
||||
@requested = cached[:requested].merge(Account.requested_map(@uncached_account_ids, @current_account_id))
|
||||
|
||||
@@ -21,15 +23,14 @@ class AccountRelationshipsPresenter
|
||||
@followed_by.merge!(options[:followed_by_map] || {})
|
||||
@blocking.merge!(options[:blocking_map] || {})
|
||||
@blocked_by.merge!(options[:blocked_by_map] || {})
|
||||
# @chat_blocking.merge!(options[:chat_blocking_map] || {})
|
||||
# @chat_blocked_by.merge!(options[:chat_blocked_by_map] || {})
|
||||
@muting.merge!(options[:muting_map] || {})
|
||||
@requested.merge!(options[:requested_map] || {})
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# : todo :
|
||||
# chat muting, chat blocking
|
||||
|
||||
def cached
|
||||
return @cached if defined?(@cached)
|
||||
|
||||
@@ -38,6 +39,8 @@ class AccountRelationshipsPresenter
|
||||
followed_by: {},
|
||||
blocking: {},
|
||||
blocked_by: {},
|
||||
# chat_blocking: {},
|
||||
# chat_blocked_by: {},
|
||||
muting: {},
|
||||
requested: {},
|
||||
}
|
||||
@@ -64,6 +67,8 @@ class AccountRelationshipsPresenter
|
||||
followed_by: { account_id => followed_by[account_id] },
|
||||
blocking: { account_id => blocking[account_id] },
|
||||
blocked_by: { account_id => blocked_by[account_id] },
|
||||
# chat_blocking: { account_id => chat_blocking[account_id] },
|
||||
# chat_blocked_by: { account_id => chat_blocked_by[account_id] },
|
||||
muting: { account_id => muting[account_id] },
|
||||
requested: { account_id => requested[account_id] },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user