mirror of https://github.com/jlelse/GoBlog
Fix hook trigger
This commit is contained in:
parent
caf21a07fd
commit
9e6a5fd90b
|
@ -131,8 +131,8 @@ func (a *goBlog) createOrReplacePost(p *post, o *postCreationOptions) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Trigger hooks
|
// Trigger hooks
|
||||||
if p.Status == statusPublished {
|
if p.Status == statusPublished || p.Status == statusUnlisted {
|
||||||
if o.new || o.oldStatus != statusPublished {
|
if o.new || (o.oldStatus != statusPublished && o.oldStatus != statusUnlisted) {
|
||||||
defer a.postPostHooks(p)
|
defer a.postPostHooks(p)
|
||||||
} else {
|
} else {
|
||||||
defer a.postUpdateHooks(p)
|
defer a.postUpdateHooks(p)
|
||||||
|
|
Loading…
Reference in New Issue