diff options
author | 2017-11-02 16:30:15 +0300 | |
---|---|---|
committer | 2017-11-02 16:30:15 +0300 | |
commit | d95a1d019b08a5eebe674e68a1692513d7d16991 (patch) | |
tree | 7be8c1e691d9e58d650b0cc4677e8e4a3c2c7b27 /juick-api/src/main/java/com/juick/api/TelegramBotManager.java | |
parent | ee20020d9c576a48173c13b68b03d349c0ec3e47 (diff) |
code cleanup
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/TelegramBotManager.java')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/TelegramBotManager.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java index 1611c23c..bdf8bc83 100644 --- a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java +++ b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java @@ -17,16 +17,12 @@ package com.juick.api; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.juick.server.component.DisconnectedEvent; import com.juick.server.component.MessageEvent; import com.juick.service.MessagesService; import com.juick.service.SubscriptionService; import com.juick.service.TelegramService; import com.pengrad.telegrambot.Callback; import com.pengrad.telegrambot.TelegramBot; -import com.pengrad.telegrambot.model.request.InlineKeyboardButton; -import com.pengrad.telegrambot.model.request.InlineKeyboardMarkup; import com.pengrad.telegrambot.model.request.ParseMode; import com.pengrad.telegrambot.request.SendMessage; import com.pengrad.telegrambot.request.SetWebhook; @@ -35,16 +31,10 @@ import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationListener; -import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; -import org.springframework.web.socket.CloseStatus; -import org.springframework.web.socket.PingMessage; -import org.springframework.web.socket.TextMessage; -import org.springframework.web.socket.WebSocketSession; -import org.springframework.web.socket.handler.TextWebSocketHandler; +import javax.annotation.Nonnull; import javax.annotation.PostConstruct; import javax.inject.Inject; import java.io.IOException; @@ -93,7 +83,7 @@ public class TelegramBotManager implements ApplicationListener<MessageEvent> { @Override - public void onApplicationEvent(MessageEvent event) { + public void onApplicationEvent(@Nonnull MessageEvent event) { com.juick.Message jmsg = event.getMessage(); String msgUrl = formatUrl(jmsg); if (jmsg.getRid() == 0) { |