reduce log level when deliverying notifications to users without permission (#2912)
This commit is contained in:
parent
ca5f3f65e2
commit
cabc15b226
1 changed files with 5 additions and 1 deletions
|
@ -130,8 +130,12 @@ func (b *Backend) BlockChanged(evt notify.BlockChangeEvent) error {
|
|||
|
||||
userID, err := b.deliverMentionNotification(username, extract, evt)
|
||||
if err != nil {
|
||||
if errors.Is(err, ErrMentionPermission) {
|
||||
b.logger.Debug("Cannot deliver notification", mlog.String("user", username), mlog.Err(err))
|
||||
} else {
|
||||
merr.Append(fmt.Errorf("cannot deliver notification for @%s: %w", username, err))
|
||||
}
|
||||
}
|
||||
|
||||
if userID == "" {
|
||||
// was a `@` followed by something other than a username.
|
||||
|
|
Loading…
Reference in a new issue