aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-09-12 13:48:48 +0200
committerRoger Braun <roger@rogerbraun.net>2017-09-12 13:48:48 +0200
commit07b694814ee98c1062c12140245c48ddc22275ec (patch)
tree7c524d5e882856c09bed19afd893bf00da0afc76 /lib
parent1bc58230ee16e6a6a809de85c31eb6f0841b16b3 (diff)
downloadpleroma-07b694814ee98c1062c12140245c48ddc22275ec.tar.gz
Optimize conversation fetching.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/activity_pub.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex
index e3dce9cba..5acbb859e 100644
--- a/lib/pleroma/web/activity_pub/activity_pub.ex
+++ b/lib/pleroma/web/activity_pub/activity_pub.ex
@@ -96,7 +96,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
def fetch_activities_for_context(context) do
query = from activity in Activity,
- where: fragment("? @> ?", activity.data, ^%{ type: "Create", context: context }),
+ where: fragment("?->>'type' = ? and ?->>'context' = ?", activity.data, "Create", activity.data, ^context),
order_by: [desc: :inserted_at]
Repo.all(query)
end