all repos — honk @ dc14d410ad0ab39164c650175ac31c1cb4d51694

my fork of honk

dig into actor url to verify id
Ted Unangst tedu@tedunangst.com
Mon, 03 Jun 2019 03:20:03 -0400
commit

dc14d410ad0ab39164c650175ac31c1cb4d51694

parent

7c66f73f21acb630e66dbbec3ded3277ee9016e3

3 files changed, 26 insertions(+), 8 deletions(-)

jump to
M activity.goactivity.go

@@ -929,3 +929,27 @@ handfull[name] = ""

handlock.Unlock() return "" } + +func investigate(name string) string { + if name == "" { + return "" + } + if name[0] == '@' { + name = gofish(name) + } + if name == "" { + return "" + } + obj, err := GetJunk(name) + if err != nil { + log.Printf("error investigating honker: %s", err) + return "" + } + t, _ := jsongetstring(obj, "type") + id, _ := jsongetstring(obj, "id") + if t != "Person" { + log.Printf("it's not a person! %s", name) + return "" + } + return id +}
M docs/manual.txtdocs/manual.txt

@@ -20,8 +20,7 @@ The easiest is probably their handle, the thing that resembles an email.

@name@example.com for example. Alternatively, one may directly enter the actor ID, which is a URL that looks -like https://example.com/users/name. Note that the commonly seen URL with -@name in it is not their actor ID and won't work. +like https://example.com/users/name. Followed honkers may be assigned to combos, listing all their honks together.
M honk.gohonk.go

@@ -1036,12 +1036,7 @@ flavor := "presub"

if peep == "peep" { flavor = "peep" } - if url == "" { - return - } - if url[0] == '@' { - url = gofish(url) - } + url = investigate(url) if url == "" { return }