bugfix
This commit is contained in:
parent
5037157ba4
commit
c3596f9ae4
|
@ -26,7 +26,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>it.tdlight</groupId>
|
<groupId>it.tdlight</groupId>
|
||||||
<artifactId>tdlight-java-bom</artifactId>
|
<artifactId>tdlight-java-bom</artifactId>
|
||||||
<version>3.1.1+td.1.8.16</version>
|
<version>3.1.2+td.1.8.16</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -34,10 +34,14 @@ final class AuthorizationStateReadyGetMe implements GenericUpdateHandler<UpdateA
|
||||||
public void onUpdate(UpdateAuthorizationState update) {
|
public void onUpdate(UpdateAuthorizationState update) {
|
||||||
if (update.authorizationState.getConstructor() == AuthorizationStateReady.CONSTRUCTOR) {
|
if (update.authorizationState.getConstructor() == AuthorizationStateReady.CONSTRUCTOR) {
|
||||||
client.send(new GetMe(), me -> {
|
client.send(new GetMe(), me -> {
|
||||||
|
try {
|
||||||
if (me.getConstructor() == Error.CONSTRUCTOR) {
|
if (me.getConstructor() == Error.CONSTRUCTOR) {
|
||||||
throw new TelegramError((Error) me);
|
throw new TelegramError((Error) me);
|
||||||
}
|
}
|
||||||
this.me.set((User) me);
|
this.me.set((User) me);
|
||||||
|
} finally {
|
||||||
|
this.meReceived.complete(null);
|
||||||
|
}
|
||||||
if (((User) me).type.getConstructor() == UserTypeRegular.CONSTRUCTOR) {
|
if (((User) me).type.getConstructor() == UserTypeRegular.CONSTRUCTOR) {
|
||||||
mainChatsLoader.onUpdate(update);
|
mainChatsLoader.onUpdate(update);
|
||||||
archivedChatsLoader.onUpdate(update);
|
archivedChatsLoader.onUpdate(update);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user