mirror of https://github.com/jlelse/GoBlog
Fix
This commit is contained in:
parent
24cd596348
commit
2d940f37a5
|
@ -213,10 +213,6 @@ func (p *post) apPost() {
|
|||
if !appConfig.ActivityPub.Enabled {
|
||||
return
|
||||
}
|
||||
if p.Published == "" || p.Section == "" {
|
||||
// No section, don't post
|
||||
return
|
||||
}
|
||||
n := p.toASNote()
|
||||
createActivity := make(map[string]interface{})
|
||||
createActivity["@context"] = asContext
|
||||
|
@ -232,10 +228,6 @@ func (p *post) apUpdate() {
|
|||
if !appConfig.ActivityPub.Enabled {
|
||||
return
|
||||
}
|
||||
if p.Published == "" || p.firstParameter("section") == "" {
|
||||
// No section, don't post
|
||||
return
|
||||
}
|
||||
n := p.toASNote()
|
||||
updateActivity := make(map[string]interface{})
|
||||
updateActivity["@context"] = asContext
|
||||
|
|
12
hooks.go
12
hooks.go
|
@ -26,8 +26,11 @@ func (p *post) postPostHooks() {
|
|||
})
|
||||
}(p, cmdTmplString)
|
||||
}
|
||||
go p.apPost()
|
||||
go p.tgPost()
|
||||
if p.Published != "" && p.Section != "" {
|
||||
// It's a published post
|
||||
go p.apPost()
|
||||
go p.tgPost()
|
||||
}
|
||||
go p.sendWebmentions()
|
||||
}
|
||||
|
||||
|
@ -40,7 +43,10 @@ func (p *post) postUpdateHooks() {
|
|||
})
|
||||
}(p, cmdTmplString)
|
||||
}
|
||||
go p.apUpdate()
|
||||
if p.Published != "" && p.Section != "" {
|
||||
// It's a published post
|
||||
go p.apUpdate()
|
||||
}
|
||||
go p.sendWebmentions()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue