avoid self mention from zev
Ted Unangst tedu@tedunangst.com
Tue, 22 Nov 2022 13:37:53 -0500
1 files changed,
5 insertions(+),
4 deletions(-)
jump to
M
fun.go
→
fun.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