diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-21 23:40:01 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:44:01 -0500 |
commit | c752a46c457759149c14ae0e4d501d5ef2ce478a (patch) | |
tree | 5066a3b5cf73ba06d16a8b494bc3e91a094f807b /app/lib/activitypub/activity | |
parent | 03338243d28df8ecca77785c77214260ca0c32c9 (diff) |
[Privacy] Implement thread ownership and visibility
Diffstat (limited to 'app/lib/activitypub/activity')
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |