mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Fix error type for dbus rate limit challenge
This commit is contained in:
parent
2ab42ca547
commit
eec7aec069
2 changed files with 3 additions and 5 deletions
|
@ -1,6 +1,5 @@
|
|||
package org.asamk;
|
||||
|
||||
import org.asamk.signal.commands.exceptions.IOErrorException;
|
||||
import org.freedesktop.dbus.DBusPath;
|
||||
import org.freedesktop.dbus.Struct;
|
||||
import org.freedesktop.dbus.annotations.DBusProperty;
|
||||
|
@ -166,7 +165,7 @@ public interface Signal extends DBusInterface {
|
|||
|
||||
String uploadStickerPack(String stickerPackPath) throws Error.Failure;
|
||||
|
||||
void submitRateLimitChallenge(String challenge, String captchaString) throws IOErrorException;
|
||||
void submitRateLimitChallenge(String challenge, String captchaString) throws Error.Failure;
|
||||
|
||||
class MessageReceivedV2 extends DBusSignal {
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package org.asamk.signal.dbus;
|
|||
|
||||
import org.asamk.Signal;
|
||||
import org.asamk.signal.BaseConfig;
|
||||
import org.asamk.signal.commands.exceptions.IOErrorException;
|
||||
import org.asamk.signal.manager.AttachmentInvalidException;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.manager.NotMasterDeviceException;
|
||||
|
@ -90,13 +89,13 @@ public class DbusSignalImpl implements Signal {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void submitRateLimitChallenge(String challenge, String captchaString) throws IOErrorException {
|
||||
public void submitRateLimitChallenge(String challenge, String captchaString) {
|
||||
final var captcha = captchaString == null ? null : captchaString.replace("signalcaptcha://", "");
|
||||
|
||||
try {
|
||||
m.submitRateLimitRecaptchaChallenge(challenge, captcha);
|
||||
} catch (IOException e) {
|
||||
throw new IOErrorException("Submit challenge error: " + e.getMessage(), e);
|
||||
throw new Error.Failure("Submit challenge error: " + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue