From 0b90d826be3ff17a1b9799daafb4f1a32fac1138 Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 19 Jul 2021 23:29:25 +0200 Subject: [PATCH] Don't notify the user who created the team --- pkg/models/listeners.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/models/listeners.go b/pkg/models/listeners.go index ced052a6..1751e4c5 100644 --- a/pkg/models/listeners.go +++ b/pkg/models/listeners.go @@ -396,6 +396,11 @@ func (s *SendTeamMemberAddedNotification) Handle(msg *message.Message) (err erro return err } + // Don't notify the user themselves + if event.Doer.ID == event.Member.ID { + return nil + } + return notifications.Notify(event.Member, &TeamMemberAddedNotification{ Member: event.Member, Doer: event.Doer,