we can ignore incoming xonks that originated as self
Ted Unangst tedu@tedunangst.com
Sun, 14 Apr 2019 10:15:47 -0400
2 files changed,
7 insertions(+),
4 deletions(-)
M
activity.go
→
activity.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) }