mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-14 17:33:48 +01:00
Disable notices for m.notice errors. Fixes #544
This commit is contained in:
parent
76c9660849
commit
5c5498c9c0
1 changed files with 2 additions and 0 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue