all repos — honk @ 5762f930ccf14b7f06fe306553ea616ed53570fb

my fork of honk

we can ignore incoming xonks that originated as self
Ted Unangst tedu@tedunangst.com
Sun, 14 Apr 2019 10:15:47 -0400
commit

5762f930ccf14b7f06fe306553ea616ed53570fb

parent

d3a1c4a58e0073fdebaa150e17ad4551549dfb33

2 files changed, 7 insertions(+), 4 deletions(-)

jump to
M activity.goactivity.go

@@ -217,8 +217,11 @@ donk.FileID, _ = res.LastInsertId()

return &donk } -func needxonk(userid int64, x *Honk) bool { - row := stmtFindXonk.QueryRow(userid, x.XID) +func needxonk(user *WhatAbout, x *Honk) bool { + if strings.HasPrefix(x.XID, user.URL + "/h/") { + return false + } + row := stmtFindXonk.QueryRow(user.ID, x.XID) err := row.Scan(&x.ID) if err == nil { return false

@@ -314,7 +317,7 @@ }

for _, item := range items { xonk := xonkxonk(item) - if xonk != nil && needxonk(user.ID, xonk) { + if xonk != nil && needxonk(user, xonk) { xonk.UserID = user.ID savexonk(xonk) }
M honk.gohonk.go

@@ -335,7 +335,7 @@ }

} default: xonk := xonkxonk(j) - if xonk != nil && needxonk(user.ID, xonk) { + if xonk != nil && needxonk(user, xonk) { xonk.UserID = user.ID savexonk(xonk) }