Merge branch 'fix/truncate-remote-user-fields' into 'develop'
[akkoma] / lib / pleroma / bookmark.ex
index bbb51c22cf3fcf9724e1c2352a627ef89df6f33f..d976f949c4f549cae5be55bf43eb05470cab70f9 100644 (file)
@@ -1,3 +1,7 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Pleroma.Bookmark do
   use Ecto.Schema
 
@@ -38,8 +42,7 @@ defmodule Pleroma.Bookmark do
     Bookmark
     |> where(user_id: ^user_id)
     |> join(:inner, [b], activity in assoc(b, :activity))
-    |> join(:inner, [_b, a], bookmarks in assoc(a, :bookmarks))
-    |> preload([b, a, b2], activity: {a, bookmarks: b2})
+    |> preload([b, a], activity: a)
   end
 
   def get(user_id, activity_id) do