clear cached reply data when adding or removing attachment to reply

This commit is contained in:
Azareal 2020-02-19 11:28:09 +10:00
parent 570569be77
commit 4e73a6e5b2
1 changed files with 2 additions and 0 deletions

View File

@ -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 {