Skip to content

Commit

Permalink
🐛 fix: Fixed the issue where telegramRecord was not assigned a value …
Browse files Browse the repository at this point in the history
…after the account was logged in for the first time.(#19)
  • Loading branch information
jarvis2f committed Jan 20, 2025
1 parent e844ac6 commit b2042ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/main/java/telegram/files/TelegramVerticle.java
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,10 @@ private void onAuthorizationStateUpdated(TdApi.AuthorizationState authorizationS
.compose(user ->
DataVerticle.telegramRepository.create(new TelegramRecord(user.id, user.firstName, this.rootPath, this.proxyName))
)
.onSuccess(o -> log.info("[%s] %s Authorization Ready".formatted(getRootId(), this.telegramRecord.firstName())))
.onSuccess(o -> {
telegramRecord = o;
log.info("[%s] %s Authorization Ready".formatted(getRootId(), this.telegramRecord.firstName()));
})
.onFailure(e -> log.error("[%s] Authorization Ready, but failed to create telegram record: %s".formatted(getRootId(), e.getMessage())));
} else {
log.info("[%s] %s Authorization Ready".formatted(getRootId(), this.telegramRecord.firstName()));
Expand Down

0 comments on commit b2042ec

Please sign in to comment.