mirror of
https://github.com/eiblog/eiblog.git
synced 2026-03-01 00:34:58 +08:00
updat
This commit is contained in:
6
ping.go
6
ping.go
@@ -20,6 +20,9 @@ type Pinger interface {
|
|||||||
type superfeedr struct{}
|
type superfeedr struct{}
|
||||||
|
|
||||||
func (_ *superfeedr) PingFunc(slug string) {
|
func (_ *superfeedr) PingFunc(slug string) {
|
||||||
|
if setting.Conf.FeedrURL == "" {
|
||||||
|
return
|
||||||
|
}
|
||||||
vals := url.Values{}
|
vals := url.Values{}
|
||||||
vals.Set("hub.mode", "publish")
|
vals.Set("hub.mode", "publish")
|
||||||
vals.Add("hub.url", "https://"+setting.Conf.Mode.Domain+"/post/"+slug+".html")
|
vals.Add("hub.url", "https://"+setting.Conf.Mode.Domain+"/post/"+slug+".html")
|
||||||
@@ -58,6 +61,9 @@ type rpcValue struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *pingRPC) PingFunc(slug string) {
|
func (p *pingRPC) PingFunc(slug string) {
|
||||||
|
if len(setting.Conf.PingRPCs) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
p.Params.Param[1].Value = "https://" + setting.Conf.Mode.Domain + "/post/" + slug + ".html"
|
p.Params.Param[1].Value = "https://" + setting.Conf.Mode.Domain + "/post/" + slug + ".html"
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
buf.WriteString(xml.Header)
|
buf.WriteString(xml.Header)
|
||||||
|
|||||||
Reference in New Issue
Block a user