Fix Notification tests.
authorlain <lain@soykaf.club>
Tue, 20 Nov 2018 18:15:28 +0000 (19:15 +0100)
committerlain <lain@soykaf.club>
Tue, 20 Nov 2018 18:15:28 +0000 (19:15 +0100)
lib/pleroma/web/common_api/common_api.ex

index 77e4dbbd708057e55a9dbee8226efd5761cf5ce5..e9bad8d04bd0e39d59f015bb0df526fad230f184 100644 (file)
@@ -8,7 +8,7 @@ defmodule Pleroma.Web.CommonAPI do
   def delete(activity_id, user) do
     with %Activity{data: %{"object" => %{"id" => object_id}}} <- Repo.get(Activity, activity_id),
          %Object{} = object <- Object.normalize(object_id),
-         true <- user.info["is_moderator"] || user.ap_id == object.data["actor"],
+         true <- user.info.is_moderator || user.ap_id == object.data["actor"],
          {:ok, delete} <- ActivityPub.delete(object) do
       {:ok, delete}
     end