all repos — honk @ 9cb115351f0d6db14b2e94802b22ec703c111731

my fork of honk

avoid self mention
from zev
Ted Unangst tedu@tedunangst.com
Tue, 22 Nov 2022 13:37:53 -0500
commit

9cb115351f0d6db14b2e94802b22ec703c111731

parent

c722c29efd89cec9d30a15badda2d27d47bd2291

1 files changed, 5 insertions(+), 4 deletions(-)

jump to
M fun.gofun.go

@@ -97,8 +97,11 @@ }

} } if user != nil { + hset := []string{} + if h.Honker != user.URL { + hset = append(hset, "@"+h.Handle) + } if user.Options.MentionAll { - hset := []string{"@" + h.Handle} for _, a := range h.Audience { if a == h.Honker || a == user.URL { continue

@@ -109,10 +112,8 @@ hand = "@" + hand

hset = append(hset, hand) } } - h.Handles = strings.Join(hset, " ") - } else if h.Honker != user.URL { - h.Handles = "@" + h.Handle } + h.Handles = strings.Join(hset, " ") } if h.URL == "" { h.URL = h.XID