all repos — honk @ 41c75993540b3f2bb739c6c986abb986e294ecaf

my fork of honk

u
Anirudh Oppiliappan x@icyphox.sh
Sun, 24 Sep 2023 11:00:38 +0300
commit

41c75993540b3f2bb739c6c986abb986e294ecaf

parent

6ee07c9220079022bb9bad6666e1a7be5642062d

1 files changed, 7 insertions(+), 1 deletions(-)

jump to
M masto.gomasto.go

@@ -4,9 +4,15 @@ import (

"crypto/rand" "fmt" "net/http" + "time" "humungus.tedunangst.com/r/webs/junk" ) + +func snowflake() uint64 { + ts := time.Now() + return uint64(uint64(ts.UnixNano()/int64(time.Millisecond))<<16 | uint64(time.Now().Nanosecond()&0xffff)) +} func badjunk(rw http.ResponseWriter, j junk.Junk, path string) { elog.Printf("%s: bad junk: %s", path, j.ToString())

@@ -36,7 +42,7 @@ return

} j := junk.New() - j["id"] = 1 + j["id"] = snowflake() j["name"] = clientName j["redirect_uri"] = redirectUri j["client_id"] = clientID