Convert rate limit apis to WebSocket.

This commit is contained in:
Cody Henthorne
2025-03-11 15:22:50 -04:00
committed by Greyson Parrelli
parent 86b2fe9742
commit 61a8636217
14 changed files with 149 additions and 63 deletions

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
@file:JvmName("ExceptionHelper")
package org.thoughtcrime.securesms.util
import org.whispersystems.signalservice.api.push.exceptions.NonSuccessfulResponseCodeException
import java.io.IOException
/**
* Returns true if this exception is a retryable I/O Exception. Helpful for jobs.
*/
fun Throwable.isRetryableIOException(): Boolean {
return this is IOException && this !is NonSuccessfulResponseCodeException
}