From c752a46c457759149c14ae0e4d501d5ef2ce478a Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Tue, 21 Jul 2020 23:40:01 -0500 Subject: [Privacy] Implement thread ownership and visibility --- app/lib/activitypub/activity/create.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/lib/activitypub/activity/create.rb') diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index d2bbd26d5..fbb4624e3 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -383,7 +383,8 @@ class ActivityPub::Activity::Create < ActivityPub::Activity return Conversation.find_by(id: OStatus::TagManager.instance.unique_tag_to_local_id(uri, 'Conversation')) if OStatus::TagManager.instance.local_id?(uri) begin - Conversation.find_or_create_by!(uri: uri) + conversation = Conversation.find_by(uri: uri) + Conversation.create!(uri: uri, account: @account, public: %i(public unlisted).include?(visibility_from_audience)) if conversation.nil? rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotUnique retry end -- cgit