aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service
diff options
context:
space:
mode:
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) {