From 4e73a6e5b2398729e73c01e1e0e0425def23d444 Mon Sep 17 00:00:00 2001 From: Azareal Date: Wed, 19 Feb 2020 11:28:09 +1000 Subject: [PATCH] clear cached reply data when adding or removing attachment to reply --- routes/reply.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routes/reply.go b/routes/reply.go index 190d29d5..341a1ba7 100644 --- a/routes/reply.go +++ b/routes/reply.go @@ -385,6 +385,7 @@ func AddAttachToReplySubmit(w http.ResponseWriter, r *http.Request, user c.User, if len(pathMap) == 0 { return c.InternalErrorJS(errors.New("no paths for attachment add"), w, r) } + _ = c.Rstore.GetCache().Remove(reply.ID) skip, rerr := lite.Hooks.VhookSkippable("action_end_add_attach_to_reply", reply.ID, &user) if skip || rerr != nil { @@ -448,6 +449,7 @@ func RemoveAttachFromReplySubmit(w http.ResponseWriter, r *http.Request, user c. return rerr } } + _ = c.Rstore.GetCache().Remove(reply.ID) skip, rerr := lite.Hooks.VhookSkippable("action_end_remove_attach_from_reply", reply.ID, &user) if skip || rerr != nil {