Commit b35ff8f7 authored by Roger Braun's avatar Roger Braun
Browse files

Use index in basic activity query.

parent 9f417fd5
......@@ -38,7 +38,7 @@ def all_by_object_ap_id(ap_id) do
def get_create_activity_by_object_ap_id(ap_id) do activity in Activity,
where: fragment("(?)->'object'->>'id' = ?",, ^to_string(ap_id))
and fragment("(?)->>'type' = 'Create'",
where: fragment("coalesce((?)->'object'->>'id', (?)->>'object') = ?",,, ^to_string(ap_id)),
where: fragment("(?)->>'type' = 'Create'",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment