all repos — honk @ 573379224ab42c4fb6c19c7f30aa04032c9aad82

my fork of honk

only fill in reply handles if logged in user
Ted Unangst tedu@tedunangst.com
Wed, 05 Aug 2020 15:49:26 -0400
commit

573379224ab42c4fb6c19c7f30aa04032c9aad82

parent

692a5f0b84f919e4e2a5105aabbc0f845b051ccc

1 files changed, 15 insertions(+), 13 deletions(-)

jump to
M fun.gofun.go

@@ -83,21 +83,23 @@ h.Username = h.Username[:20] + ".."

} } } - if user.Options.MentionAll { - hset := []string{"@" + h.Handle} - for _, a := range h.Audience { - if a == h.Honker || a == user.URL { - continue - } - _, hand := handles(a) - if hand != "" { - hand = "@" + hand - hset = append(hset, hand) + if user != nil { + if user.Options.MentionAll { + hset := []string{"@" + h.Handle} + for _, a := range h.Audience { + if a == h.Honker || a == user.URL { + continue + } + _, hand := handles(a) + if hand != "" { + 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, " ") - } else if h.Honker != user.URL { - h.Handles = "@" + h.Handle } if h.URL == "" { h.URL = h.XID