Don't notify the user who created the team

This commit is contained in:
kolaente 2021-07-19 23:29:25 +02:00
parent 850c3a3dd4
commit 0b90d826be
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 0 deletions

View File

@ -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,