aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-05-19 19:57:24 +0300
committerGravatar Vitaly Takmazov2016-05-19 19:57:24 +0300
commit15f02eb428584970a95ce5787299f32b432b9a80 (patch)
treead3ea37f844513328dbef00222974ee3dd70901c /src/main/java/com/juick
parentcc0a29650d3ba9b848a86cce73fbe6e3ff5d8693 (diff)
telegram: fix user query
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/api/TelegramBotHook.java2
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 907898f2..0cc3aa84 100644
--- a/src/main/java/com/juick/api/TelegramBotHook.java
+++ b/src/main/java/com/juick/api/TelegramBotHook.java
@@ -146,7 +146,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();