* Actually create conversations given explicit URIs * Try to get the parent toot in before validation, to avoid creating a new conversation
This commit is contained in:
parent
d8ec832806
commit
15b43f555d
|
@ -66,8 +66,6 @@ class ProcessFeedService < BaseService
|
||||||
status.reblog = original_status.reblog? ? original_status.reblog : original_status
|
status.reblog = original_status.reblog? ? original_status.reblog : original_status
|
||||||
end
|
end
|
||||||
|
|
||||||
status.thread = find_status(thread(@xml).first) if thread?(@xml)
|
|
||||||
|
|
||||||
status.save!
|
status.save!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -155,7 +153,8 @@ class ProcessFeedService < BaseService
|
||||||
reply: thread?(entry),
|
reply: thread?(entry),
|
||||||
language: content_language(entry),
|
language: content_language(entry),
|
||||||
visibility: visibility_scope(entry),
|
visibility: visibility_scope(entry),
|
||||||
conversation: find_or_create_conversation(entry)
|
conversation: find_or_create_conversation(entry),
|
||||||
|
thread: thread?(entry) ? find_status(thread(entry).first) : nil
|
||||||
)
|
)
|
||||||
|
|
||||||
mentions_from_xml(status, entry)
|
mentions_from_xml(status, entry)
|
||||||
|
@ -174,7 +173,7 @@ class ProcessFeedService < BaseService
|
||||||
return Conversation.find_by(id: local_id)
|
return Conversation.find_by(id: local_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
Conversation.find_by(uri: uri)
|
Conversation.find_by(uri: uri) || Conversation.create!(uri: uri)
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_status(uri)
|
def find_status(uri)
|
||||||
|
|
Reference in a new issue