Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
cavallium committed Aug 30, 2023
1 parent 5037157 commit c3596f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>it.tdlight</groupId>
<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>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ public AuthorizationStateReadyGetMe(TelegramClient client,
public void onUpdate(UpdateAuthorizationState update) {
if (update.authorizationState.getConstructor() == AuthorizationStateReady.CONSTRUCTOR) {
client.send(new GetMe(), me -> {
if (me.getConstructor() == Error.CONSTRUCTOR) {
throw new TelegramError((Error) me);
try {
if (me.getConstructor() == Error.CONSTRUCTOR) {
throw new TelegramError((Error) me);
}
this.me.set((User) me);
} finally {
this.meReceived.complete(null);
}
this.me.set((User) me);
if (((User) me).type.getConstructor() == UserTypeRegular.CONSTRUCTOR) {
mainChatsLoader.onUpdate(update);
archivedChatsLoader.onUpdate(update);
Expand Down

0 comments on commit c3596f9

Please sign in to comment.