clear cached reply data when adding or removing attachment to reply
This commit is contained in:
parent
570569be77
commit
4e73a6e5b2
|
@ -385,6 +385,7 @@ func AddAttachToReplySubmit(w http.ResponseWriter, r *http.Request, user c.User,
|
||||||
if len(pathMap) == 0 {
|
if len(pathMap) == 0 {
|
||||||
return c.InternalErrorJS(errors.New("no paths for attachment add"), w, r)
|
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)
|
skip, rerr := lite.Hooks.VhookSkippable("action_end_add_attach_to_reply", reply.ID, &user)
|
||||||
if skip || rerr != nil {
|
if skip || rerr != nil {
|
||||||
|
@ -448,6 +449,7 @@ func RemoveAttachFromReplySubmit(w http.ResponseWriter, r *http.Request, user c.
|
||||||
return rerr
|
return rerr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_ = c.Rstore.GetCache().Remove(reply.ID)
|
||||||
|
|
||||||
skip, rerr := lite.Hooks.VhookSkippable("action_end_remove_attach_from_reply", reply.ID, &user)
|
skip, rerr := lite.Hooks.VhookSkippable("action_end_remove_attach_from_reply", reply.ID, &user)
|
||||||
if skip || rerr != nil {
|
if skip || rerr != nil {
|
||||||
|
|
Loading…
Reference in New Issue