Disable notices for m.notice errors. Fixes #544

This commit is contained in:
Tulir Asokan 2022-08-24 12:00:01 +03:00
parent 76c9660849
commit 5c5498c9c0

View file

@ -74,6 +74,8 @@ func errorToStatusReason(err error) (reason event.MessageStatusReason, status ev
errors.Is(err, errBroadcastReactionNotSupported), errors.Is(err, errBroadcastReactionNotSupported),
errors.Is(err, errBroadcastSendDisabled): errors.Is(err, errBroadcastSendDisabled):
return event.MessageStatusUnsupported, event.MessageStatusFail, true, true, "" return event.MessageStatusUnsupported, event.MessageStatusFail, true, true, ""
case errors.Is(err, errMNoticeDisabled):
return event.MessageStatusUnsupported, event.MessageStatusFail, true, false, ""
case errors.Is(err, errMediaUnsupportedType): case errors.Is(err, errMediaUnsupportedType):
return event.MessageStatusUnsupported, event.MessageStatusFail, true, true, err.Error() return event.MessageStatusUnsupported, event.MessageStatusFail, true, true, err.Error()
case errors.Is(err, errTimeoutBeforeHandling): case errors.Is(err, errTimeoutBeforeHandling):