Commit 14a9dd46 authored by lain's avatar lain
Browse files

Use more efficient query.

parent fe27b61a
......@@ -12,7 +12,7 @@ defmodule Pleroma.Activity do
def get_by_ap_id(ap_id) do activity in Activity,
where: fragment("? @> ?",, ^%{id: ap_id}))
where: fragment("(?)->>'id' = ?",, ^to_string(ap_id)))
def all_by_object_ap_id(ap_id) do
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