make the ping command easier to use
Ted Unangst tedu@tedunangst.com
Wed, 11 Nov 2020 14:44:51 -0500
3 files changed,
16 insertions(+),
1 deletions(-)
M
docs/changelog.txt
→
docs/changelog.txt
@@ -1,5 +1,9 @@
changelog +=== next + ++ Easier to use ping command. + === 0.9.3 Notacanthous Nutshell ++ backup command.
M
web.go
→
web.go
@@ -257,12 +257,23 @@ return false
} func ping(user *WhatAbout, who string) { + if targ := fullname(who, user.ID); targ != "" { + who = targ + } + if !strings.HasPrefix(who, "https:") { + who = gofish(who) + } + if who == "" { + log.Printf("nobody to ping!") + return + } var box *Box ok := boxofboxes.Get(who, &box) if !ok { log.Printf("no inbox to ping %s", who) return } + log.Printf("sending ping to %s", box.In) j := junk.New() j["@context"] = itiswhatitis j["type"] = "Ping"