tdlight-java/tdlight-java/src/main/java/it/tdlight/client/AuthenticationDataQrCode.java

32 lines
646 B
Java
Raw Normal View History

2021-09-27 22:15:17 +02:00
package it.tdlight.client;
2023-04-27 02:14:39 +02:00
import java.util.concurrent.CompletableFuture;
class AuthenticationDataQrCode implements SimpleAuthenticationSupplier<AuthenticationDataQrCode> {
2021-09-27 22:15:17 +02:00
@Override
public boolean isQrCode() {
return true;
}
@Override
public boolean isBot() {
return false;
}
@Override
2023-02-27 20:51:49 +01:00
public String getUserPhoneNumber() {
2021-09-27 22:15:17 +02:00
throw new UnsupportedOperationException("This is not a user");
}
@Override
public String getBotToken() {
throw new UnsupportedOperationException("This is not a bot");
}
2023-04-27 02:14:39 +02:00
@Override
public CompletableFuture<AuthenticationDataQrCode> get() {
return CompletableFuture.completedFuture(this);
}
2021-09-27 22:15:17 +02:00
}