This commit is contained in:
Jan-Lukas Else 2020-11-11 18:37:17 +01:00
parent 24cd596348
commit 2d940f37a5
2 changed files with 9 additions and 11 deletions

View File

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

View File

@ -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()
}