mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-13 17:13:11 +01:00
Allow retries on message taking too long errors
This commit is contained in:
parent
14581a314e
commit
4b69c16f1a
1 changed files with 1 additions and 5 deletions
|
@ -71,12 +71,8 @@ func errorToStatusReason(err error) (reason event.MessageStatusReason, isCertain
|
|||
return event.MessageStatusUnsupported, true, false, true
|
||||
case errors.Is(err, errTimeoutBeforeHandling):
|
||||
return event.MessageStatusTooOld, true, true, true
|
||||
case errors.Is(err, context.DeadlineExceeded):
|
||||
case errors.Is(err, context.DeadlineExceeded), errors.Is(err, errMessageTakingLong):
|
||||
return event.MessageStatusTooOld, false, true, true
|
||||
case errors.Is(err, errMessageTakingLong):
|
||||
// Set can_retry=false here since we'll send another status event allowing the retry later
|
||||
// Technically retrying when this happens is fine, but we'd just ignore it anyway.
|
||||
return event.MessageStatusTooOld, false, false, true
|
||||
case errors.Is(err, errTargetNotFound),
|
||||
errors.Is(err, errTargetIsFake),
|
||||
errors.Is(err, errReactionDatabaseNotFound),
|
||||
|
|
Loading…
Reference in a new issue