mirror of
https://github.com/mautrix/whatsapp.git
synced 2026-11-09 23:59:17 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95fca89b2f |
1 changed files with 6 additions and 0 deletions
|
|
@ -73,6 +73,12 @@ func wrapWhatsAppError(err error) error {
|
||||||
WithStatus(event.MessageStatusFail).
|
WithStatus(event.MessageStatusFail).
|
||||||
WithIsCertain(true).
|
WithIsCertain(true).
|
||||||
WithSendNotice(true)
|
WithSendNotice(true)
|
||||||
|
case errors.Is(err, whatsmeow.ErrRecipientNotOnWhatsApp):
|
||||||
|
return bridgev2.WrapErrorInStatus(err).
|
||||||
|
WithMessage("this phone number isn't on WhatsApp").
|
||||||
|
WithStatus(event.MessageStatusFail).
|
||||||
|
WithIsCertain(true).
|
||||||
|
WithSendNotice(true)
|
||||||
case errors.Is(err, whatsmeow.ErrServerReturnedError), errors.As(err, &iqErr):
|
case errors.Is(err, whatsmeow.ErrServerReturnedError), errors.As(err, &iqErr):
|
||||||
return bridgev2.WrapErrorInStatus(err).
|
return bridgev2.WrapErrorInStatus(err).
|
||||||
WithMessage("WhatsApp returned an error").
|
WithMessage("WhatsApp returned an error").
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue