🐛 fix: Fixed the issue where telegramRecord was not assigned a value after the account was logged in for the first time.(#19)

This commit is contained in:
jarvis2f 2025-01-20 15:30:49 +08:00
parent e844ac6284
commit b2042ecdee

View file

@ -743,7 +743,10 @@ public class TelegramVerticle extends AbstractVerticle {
.compose(user -> .compose(user ->
DataVerticle.telegramRepository.create(new TelegramRecord(user.id, user.firstName, this.rootPath, this.proxyName)) 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()))); .onFailure(e -> log.error("[%s] Authorization Ready, but failed to create telegram record: %s".formatted(getRootId(), e.getMessage())));
} else { } else {
log.info("[%s] %s Authorization Ready".formatted(getRootId(), this.telegramRecord.firstName())); log.info("[%s] %s Authorization Ready".formatted(getRootId(), this.telegramRecord.firstName()));