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,7 +130,11 @@ func (b *Backend) BlockChanged(evt notify.BlockChangeEvent) error {
|
||||||
|
|
||||||
userID, err := b.deliverMentionNotification(username, extract, evt)
|
userID, err := b.deliverMentionNotification(username, extract, evt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
merr.Append(fmt.Errorf("cannot deliver notification for @%s: %w", username, err))
|
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 == "" {
|
if userID == "" {
|
||||||
|
|
Loading…
Reference in a new issue