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 {
|
if !appConfig.ActivityPub.Enabled {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if p.Published == "" || p.Section == "" {
|
|
||||||
// No section, don't post
|
|
||||||
return
|
|
||||||
}
|
|
||||||
n := p.toASNote()
|
n := p.toASNote()
|
||||||
createActivity := make(map[string]interface{})
|
createActivity := make(map[string]interface{})
|
||||||
createActivity["@context"] = asContext
|
createActivity["@context"] = asContext
|
||||||
|
@ -232,10 +228,6 @@ func (p *post) apUpdate() {
|
||||||
if !appConfig.ActivityPub.Enabled {
|
if !appConfig.ActivityPub.Enabled {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if p.Published == "" || p.firstParameter("section") == "" {
|
|
||||||
// No section, don't post
|
|
||||||
return
|
|
||||||
}
|
|
||||||
n := p.toASNote()
|
n := p.toASNote()
|
||||||
updateActivity := make(map[string]interface{})
|
updateActivity := make(map[string]interface{})
|
||||||
updateActivity["@context"] = asContext
|
updateActivity["@context"] = asContext
|
||||||
|
|
12
hooks.go
12
hooks.go
|
@ -26,8 +26,11 @@ func (p *post) postPostHooks() {
|
||||||
})
|
})
|
||||||
}(p, cmdTmplString)
|
}(p, cmdTmplString)
|
||||||
}
|
}
|
||||||
go p.apPost()
|
if p.Published != "" && p.Section != "" {
|
||||||
go p.tgPost()
|
// It's a published post
|
||||||
|
go p.apPost()
|
||||||
|
go p.tgPost()
|
||||||
|
}
|
||||||
go p.sendWebmentions()
|
go p.sendWebmentions()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +43,10 @@ func (p *post) postUpdateHooks() {
|
||||||
})
|
})
|
||||||
}(p, cmdTmplString)
|
}(p, cmdTmplString)
|
||||||
}
|
}
|
||||||
go p.apUpdate()
|
if p.Published != "" && p.Section != "" {
|
||||||
|
// It's a published post
|
||||||
|
go p.apUpdate()
|
||||||
|
}
|
||||||
go p.sendWebmentions()
|
go p.sendWebmentions()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue