From 558e6a84d6750cc245e6656ab12e9e8bbb4f256c Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Thu, 1 Nov 2018 06:52:01 +0100 Subject: [PATCH] =?utf8?q?[Pleroma.Web.CommonAPI]:=20Delete=20post=20cache?= =?utf8?q?=20entry=20when=20it=E2=80=99s=20deleted?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Closes: https://git.pleroma.social/pleroma/pleroma/issues/346 --- lib/pleroma/web/common_api/common_api.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index 8f47bb127..8607cb6b3 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -9,7 +9,8 @@ defmodule Pleroma.Web.CommonAPI 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"], - {:ok, delete} <- ActivityPub.delete(object) do + {:ok, delete} <- ActivityPub.delete(object), + {:ok, true} <- Cachex.del(:user_cache, "object:#{object_id}") do {:ok, delete} end end -- 2.45.2