aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java')
-rw-r--r--juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java b/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java
index be29ee62..dc10ceba 100644
--- a/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java
+++ b/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java
@@ -34,8 +34,8 @@ import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import javax.inject.Inject;
-import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
+import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.List;
@@ -55,8 +55,8 @@ public class TelegramWebhook {
@RequestMapping(value = "/tlgmbtwbhk", method = RequestMethod.POST)
@ResponseStatus(value = HttpStatus.OK)
- public void processUpdate(HttpServletRequest request) throws IOException {
- Update update = BotUtils.parseUpdate(IOUtils.toString(request.getInputStream(), StandardCharsets.UTF_8));
+ public void processUpdate(InputStream body) throws IOException {
+ Update update = BotUtils.parseUpdate(IOUtils.toString(body, StandardCharsets.UTF_8));
Message message = update.message();
if (update.message() == null) {
message = update.editedMessage();