From 2dd33510e9b82174605bc0f19514cf04d194fe52 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 19 May 2016 21:09:38 +0300 Subject: fix user query --- src/main/java/com/juick/api/TelegramBotHook.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/juick') diff --git a/src/main/java/com/juick/api/TelegramBotHook.java b/src/main/java/com/juick/api/TelegramBotHook.java index 80ae0649..6b1f946c 100644 --- a/src/main/java/com/juick/api/TelegramBotHook.java +++ b/src/main/java/com/juick/api/TelegramBotHook.java @@ -194,7 +194,7 @@ public class TelegramBotHook { } private Optional getUser(long tgId) { try { - return Optional.of(jdbc.queryForObject("SELECT id, nick, 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(); -- cgit v1.2.3