Update tdlib
This commit is contained in:
parent
438689462f
commit
e54278d38d
24
pom.xml
24
pom.xml
|
@ -9,16 +9,16 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<revision>0-SNAPSHOT</revision>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
|
||||
<vertx.version>4.2.0</vertx.version>
|
||||
<vertx.version>4.2.1</vertx.version>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>protoarch</id>
|
||||
<name>protoarch</name>
|
||||
<url>http://home.apache.org/~aajisaka/repository</url>
|
||||
<url>https://home.apache.org/~aajisaka/repository</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>mchv-release</id>
|
||||
|
@ -65,8 +65,10 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>it.tdlight</groupId>
|
||||
<artifactId>tdlight-java</artifactId>
|
||||
<version>2.7.9.2</version>
|
||||
<artifactId>tdlight-java-bom</artifactId>
|
||||
<version>1.0.0.0-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
@ -95,7 +97,7 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>5.8.1</version>
|
||||
<version>5.8.2</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
@ -107,7 +109,7 @@
|
|||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>5.8.1</version>
|
||||
<version>5.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -118,12 +120,12 @@
|
|||
<dependency>
|
||||
<groupId>io.projectreactor</groupId>
|
||||
<artifactId>reactor-core</artifactId>
|
||||
<version>3.4.11</version>
|
||||
<version>3.4.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.projectreactor</groupId>
|
||||
<artifactId>reactor-tools</artifactId>
|
||||
<version>3.4.11</version>
|
||||
<version>3.4.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.projectreactor.addons</groupId>
|
||||
|
@ -158,7 +160,7 @@
|
|||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-tcnative-boringssl-static</artifactId>
|
||||
<version>2.0.45.Final</version>
|
||||
<version>2.0.46.Final</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -57,7 +57,7 @@ public class TestClient implements ReactorTelegramClient {
|
|||
|
||||
private static Message generateRandomMessage(boolean randomSender, boolean randomChat, boolean randomText) {
|
||||
var msg = new Message();
|
||||
msg.sender = new MessageSenderUser(312042);
|
||||
msg.senderId = new MessageSenderUser(312042);
|
||||
msg.chatId = 240213;
|
||||
msg.id = incrementalMessageId.getAndIncrement();
|
||||
var content = new MessageText();
|
||||
|
|
|
@ -80,7 +80,7 @@ public class AsyncTdEasy {
|
|||
|
||||
this.incomingUpdates = td.receive()
|
||||
.flatMapSequential(this::preprocessUpdates)
|
||||
.flatMapSequential(update -> Mono.from(this.getState()).single().map(state -> new AsyncTdUpdateObj(state, update)))
|
||||
.flatMapSequential(update -> Mono.from(this.state()).single().map(state -> new AsyncTdUpdateObj(state, update)))
|
||||
.map(upd -> (TdApi.Update) upd.getUpdate())
|
||||
.doOnError(ex -> {
|
||||
if (ex instanceof TdError) {
|
||||
|
@ -156,7 +156,7 @@ public class AsyncTdEasy {
|
|||
/**
|
||||
* Get TDLib state
|
||||
*/
|
||||
public Flux<AuthorizationState> getState() {
|
||||
public Flux<AuthorizationState> state() {
|
||||
return authState.asFlux().distinct();
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ public class AsyncTdEasy {
|
|||
* Closes the client gracefully by sending {@link TdApi.Close}.
|
||||
*/
|
||||
public Mono<Void> close() {
|
||||
return Mono.from(getState())
|
||||
return Mono.from(state())
|
||||
.filter(state -> {
|
||||
switch (state.getConstructor()) {
|
||||
case AuthorizationStateClosing.CONSTRUCTOR:
|
||||
|
@ -438,7 +438,7 @@ public class AsyncTdEasy {
|
|||
return thenOrFatalError(Mono.fromCallable(this.settings::get).single().flatMap(settings -> {
|
||||
if (settings.isPhoneNumberSet()) {
|
||||
return sendDirectly(new SetAuthenticationPhoneNumber(String.valueOf(settings.getPhoneNumber()),
|
||||
new PhoneNumberAuthenticationSettings(false, false, false)
|
||||
new PhoneNumberAuthenticationSettings(false, false, false, false, null)
|
||||
), false);
|
||||
} else if (settings.isBotTokenSet()) {
|
||||
return sendDirectly(new CheckAuthenticationBotToken(settings.getBotToken()), false);
|
||||
|
@ -550,6 +550,7 @@ public class AsyncTdEasy {
|
|||
.filterWhen(file -> Mono
|
||||
.fromCallable(() -> Files.exists(file))
|
||||
.subscribeOn(Schedulers.boundedElastic()))
|
||||
.publishOn(Schedulers.boundedElastic())
|
||||
.doOnNext(directory -> {
|
||||
try {
|
||||
if (!Files.walk(directory)
|
||||
|
|
|
@ -9,7 +9,7 @@ import io.vertx.core.AsyncResult;
|
|||
import io.vertx.core.Future;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.Promise;
|
||||
import io.vertx.reactivex.core.eventbus.Message;
|
||||
import io.vertx.reactivex.core.eventbus.Message;
|
||||
import io.vertx.reactivex.core.eventbus.MessageConsumer;
|
||||
import io.vertx.reactivex.core.streams.Pipe;
|
||||
import io.vertx.reactivex.core.streams.ReadStream;
|
||||
|
|
Loading…
Reference in New Issue
Block a user