aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-31 02:20:29 +0300
committerGravatar Vitaly Takmazov2022-12-31 03:01:06 +0300
commitaa9240e5431c5ee81f3d25d6481c66c445d11711 (patch)
tree4faae3b64702d84833d9bafce8092c25fa1ba731 /src/main/java/com/juick/service
parentbf5550b515c305c017cf8b3fcf04976d74314233 (diff)
Remove roster chats
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r--src/main/java/com/juick/service/ChatService.java6
-rw-r--r--src/main/java/com/juick/service/ChatServiceImpl.java26
2 files changed, 1 insertions, 31 deletions
diff --git a/src/main/java/com/juick/service/ChatService.java b/src/main/java/com/juick/service/ChatService.java
index b09e93b0..4c0ed214 100644
--- a/src/main/java/com/juick/service/ChatService.java
+++ b/src/main/java/com/juick/service/ChatService.java
@@ -29,12 +29,6 @@ import java.util.List;
public interface ChatService {
boolean createMessage(int uidFrom, int uid_to, String body);
- boolean addPMinRoster(int uid, String jid);
-
- boolean removePMinRoster(int uid, String jid);
-
- boolean havePMinRoster(int uid, String jid);
-
List<Chat> getLastChats(User user);
List<Message> getChat(int uid, int uidTo);
diff --git a/src/main/java/com/juick/service/ChatServiceImpl.java b/src/main/java/com/juick/service/ChatServiceImpl.java
index 2d3fe31a..9409d397 100644
--- a/src/main/java/com/juick/service/ChatServiceImpl.java
+++ b/src/main/java/com/juick/service/ChatServiceImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2020, Juick
+ * Copyright (C) 2008-2022, 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
@@ -41,30 +41,6 @@ public class ChatServiceImpl extends BaseJdbcService implements ChatService {
uidFrom, uid_to, body) > 0;
}
- @Transactional
- @Override
- public boolean addPMinRoster(final int uid, final String jid) {
- return getJdbcTemplate().update(
- "INSERT INTO pm_inroster(user_id, jid) VALUES (?, ?) ON DUPLICATE KEY UPDATE user_id=user_id", uid, jid) > 0;
- }
-
- @Transactional
- @Override
- public boolean removePMinRoster(final int uid, final String jid) {
- return getJdbcTemplate().update(
- "DELETE FROM pm_inroster WHERE user_id = ? AND jid = ?", uid, jid) > 0;
- }
-
- @Transactional
- @Override
- public boolean havePMinRoster(final int uid, final String jid) {
- List<Integer> res = getJdbcTemplate().queryForList(
- "SELECT 1 FROM pm_inroster WHERE user_id = ? AND jid = ?",
- Integer.class,
- uid, jid);
- return res.size() > 0;
- }
-
@Transactional(readOnly = true)
@Override
public List<Chat> getLastChats(final User user) {