Add conversations API (#8832)
* Add conversations API * Add web UI for conversations * Add test for conversations API * Add tests for ConversationAccount * Improve web UI * Rename ConversationAccount to AccountConversation * Remove conversations on block and mute * Change last_status_id to be a denormalization of status_ids * Add optimistic locking
This commit is contained in:
parent
25744d43b0
commit
774ac47373
33 changed files with 816 additions and 44 deletions
|
@ -13,6 +13,7 @@ class FanOutOnWriteService < BaseService
|
|||
if status.direct_visibility?
|
||||
deliver_to_mentioned_followers(status)
|
||||
deliver_to_direct_timelines(status)
|
||||
deliver_to_own_conversation(status)
|
||||
else
|
||||
deliver_to_followers(status)
|
||||
deliver_to_lists(status)
|
||||
|
@ -99,6 +100,11 @@ class FanOutOnWriteService < BaseService
|
|||
status.mentions.includes(:account).each do |mention|
|
||||
Redis.current.publish("timeline:direct:#{mention.account.id}", @payload) if mention.account.local?
|
||||
end
|
||||
|
||||
Redis.current.publish("timeline:direct:#{status.account.id}", @payload) if status.account.local?
|
||||
end
|
||||
|
||||
def deliver_to_own_conversation(status)
|
||||
AccountConversation.add_status(status.account, status)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue