aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-05-24 14:44:11 +0300
committerGravatar Vitaly Takmazov2016-05-24 14:44:11 +0300
commit740fa16a06f9aeae839ffda6344c663a258d8e85 (patch)
treea2f0f0610862f41c9594bd903200cea7d2bcca52
parent3c47c5763ad624ac525cd8d2c19b08b61a55fcda (diff)
fix telegram signup
m---------deps/com.juick.server10
-rw-r--r--src/main/java/com/juick/api/TelegramBotHook.java4
2 files changed, 7 insertions, 7 deletions
diff --git a/deps/com.juick.server b/deps/com.juick.server
-Subproject b633724c75081eb05b70ceee74636f19576a448
+Subproject 1ce6bc55817129159b1cda5076d039e9c3bc850
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());