Deduplicate with local status on Create activity (#4763)

This commit is contained in:
unarist 2017-09-02 04:00:43 +09:00 committed by Eugen Rochko
parent 966e05ced2
commit 4c0dbcadfe

View file

@ -25,7 +25,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
private private
def find_existing_status def find_existing_status
status = Status.find_by(uri: object_uri) status = status_from_uri(object_uri)
status ||= Status.find_by(uri: @object['_:atomUri']) if @object['_:atomUri'].present? status ||= Status.find_by(uri: @object['_:atomUri']) if @object['_:atomUri'].present?
status status
end end