Browse Source

Merge pull request #1067 from ThibG/glitch-soc/merge-upstream

Merge upstream changes
closed-social-glitch-2
ThibG 5 years ago
committed by GitHub
parent
commit
72bf354e97
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      app/lib/activitypub/activity/create.rb

+ 5
- 1
app/lib/activitypub/activity/create.rb View File

@ -267,7 +267,11 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
def conversation_from_uri(uri)
return nil if uri.nil?
return Conversation.find_by(id: OStatus::TagManager.instance.unique_tag_to_local_id(uri, 'Conversation')) if OStatus::TagManager.instance.local_id?(uri)
Conversation.find_by(uri: uri) || Conversation.create(uri: uri)
begin
Conversation.find_or_create_by!(uri: uri)
rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotUnique
retry
end
end
def visibility_from_audience

Loading…
Cancel
Save