From 8c7a78b4cd5d71661362ebd3209bc53e715bff53 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 10 Jan 2023 09:26:45 +0300 Subject: Code cleanup and copyright year update --- src/main/java/com/juick/XMPPManager.java | 8 ++------ src/main/java/com/juick/config/XMPPConfig.java | 7 +------ src/main/resources/templates/views/partial/footer.html | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/main/java/com/juick/XMPPManager.java b/src/main/java/com/juick/XMPPManager.java index 38da2d51..97e48257 100644 --- a/src/main/java/com/juick/XMPPManager.java +++ b/src/main/java/com/juick/XMPPManager.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2022, Juick + * Copyright (C) 2008-2023, Juick * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -20,7 +20,6 @@ package com.juick; import com.juick.model.CommandResult; import com.juick.model.User; import com.juick.service.MessagesService; -import com.juick.service.ChatService; import com.juick.service.StorageService; import com.juick.service.UserService; import com.juick.service.component.NotificationListener; @@ -79,7 +78,6 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; -import java.util.function.BiFunction; /** * @author ugnich @@ -90,17 +88,15 @@ public class XMPPManager implements NotificationListener { private final CommandsManager commandsManager; private final MessagesService messagesService; private final UserService userService; - private final ChatService chatService; private final Jid jid; public XMPPManager(String botJid, String componentName, int componentPort, String componentHost, String password, Resource vCardImage, CommandsManager commandsManager, StorageService storageService, MessagesService messagesService, UserService userService, - ChatService chatService, Executor applicationTaskExecutor) { + Executor applicationTaskExecutor) { jid = Jid.of(botJid); this.commandsManager = commandsManager; this.messagesService = messagesService; this.userService = userService; - this.chatService = chatService; logger.info("xmpp component start connecting to {}", componentPort); XmppSessionConfiguration configuration = XmppSessionConfiguration.builder() .extensions(Extension.of(com.juick.model.Message.class), Extension.of(MessageQuery.class)) diff --git a/src/main/java/com/juick/config/XMPPConfig.java b/src/main/java/com/juick/config/XMPPConfig.java index acf15bfe..2086f237 100644 --- a/src/main/java/com/juick/config/XMPPConfig.java +++ b/src/main/java/com/juick/config/XMPPConfig.java @@ -20,10 +20,8 @@ package com.juick.config; import com.juick.CommandsManager; import com.juick.XMPPManager; import com.juick.service.MessagesService; -import com.juick.service.ChatService; import com.juick.service.StorageService; import com.juick.service.UserService; -import com.juick.www.WebApp; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; @@ -57,14 +55,11 @@ public class XMPPConfig { @Inject private UserService userService; @Inject - private ChatService chatService; - @Inject private Executor applicationTaskExecutor; @Bean(destroyMethod = "close") XMPPManager xmppConnection() { return new XMPPManager(botJid, componentName, componentPort, componentHost, password, vCardImage, - commandsManager, storageService, messagesService, userService, chatService, - applicationTaskExecutor); + commandsManager, storageService, messagesService, userService, applicationTaskExecutor); } } diff --git a/src/main/resources/templates/views/partial/footer.html b/src/main/resources/templates/views/partial/footer.html index fb5a436c..9e7e9d2e 100644 --- a/src/main/resources/templates/views/partial/footer.html +++ b/src/main/resources/templates/views/partial/footer.html @@ -1,5 +1,5 @@