diff options
author | Vitaly Takmazov | 2016-05-24 14:44:11 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-05-24 14:44:11 +0300 |
commit | 740fa16a06f9aeae839ffda6344c663a258d8e85 (patch) | |
tree | a2f0f0610862f41c9594bd903200cea7d2bcca52 /src | |
parent | 3c47c5763ad624ac525cd8d2c19b08b61a55fcda (diff) |
fix telegram signup
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/juick/api/TelegramBotHook.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/api/TelegramBotHook.java b/src/main/java/com/juick/api/TelegramBotHook.java index fa05c2f0..8c23973e 100644 --- a/src/main/java/com/juick/api/TelegramBotHook.java +++ b/src/main/java/com/juick/api/TelegramBotHook.java @@ -153,10 +153,10 @@ public class TelegramBotHook { addChat(message.chat().id()); logger.info("added chat with " + message.from().firstName()); createTelegramUser(message.from().id(), message.from().username()); - telegramSignupNotify(message.from().id().longValue(), UserQueries.getSignUpHashByTelegramID(jdbc, message.from().id().longValue())); + telegramSignupNotify(message.from().id().longValue(), UserQueries.getSignUpHashByTelegramID(jdbc, message.from().id().longValue(), message.from().username())); } else { if (user_from.getUID() == 0) { - telegramSignupNotify(message.from().id().longValue(), UserQueries.getSignUpHashByTelegramID(jdbc, message.from().id().longValue())); + telegramSignupNotify(message.from().id().longValue(), UserQueries.getSignUpHashByTelegramID(jdbc, message.from().id().longValue(), message.from().username())); } else if (message.text().equalsIgnoreCase("/login")) { String msg = String.format("Hi, %s!\nTap to log in", user_from.getUName()); String msgUrl = "http://juick.com/login?" + UserQueries.getHashByUID(jdbc, user_from.getUID()); |