diff options
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/juick/api/TelegramBotHook.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/api/TelegramBotHook.java b/src/main/java/com/juick/api/TelegramBotHook.java index 40ff5411..97418418 100644 --- a/src/main/java/com/juick/api/TelegramBotHook.java +++ b/src/main/java/com/juick/api/TelegramBotHook.java @@ -178,7 +178,7 @@ public class TelegramBotHook { } private Optional<User> getUser(long tgId) { try { - return Optional.of(jdbc.queryForObject("SELECT id, name, banned FROM users INNER JOIN telegram" + + return Optional.of(jdbc.queryForObject("SELECT id, nick, banned FROM users INNER JOIN telegram" + "ON telegram.user_id = users.id WHERE telegram.tg_id=?", new UserQueries.UserMapper(), tgId)); } catch (EmptyResultDataAccessException e) { return Optional.empty(); |