From e149bceac9b24f89c7f3321d3fd9b8034874b20b Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 22 Nov 2022 13:37:53 -0500 Subject: [PATCH] avoid self mention from zev --- fun.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fun.go b/fun.go index a5bc89a..2f6fc8e 100644 --- a/fun.go +++ b/fun.go @@ -97,8 +97,11 @@ func reverbolate(userid int64, honks []*Honk) { } } 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 @@ func reverbolate(userid int64, honks []*Honk) { 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