aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-02-23 22:40:43 +0100
committersteckbrief <steckbrief@chefmail.de>2016-02-23 22:40:43 +0100
commit5fcd69c68b5f530ac76836d4f3a761cdba958356 (patch)
treea5a71bcf5b75cea4e86a990b4d37205f23a9d9dd /src/main/java/de/thedevstack
parent6d4a55a08743032bb3f0a068d09aaae588eb0b17 (diff)
Packet sending helper moved to XmppSendUtil and methods in XmppConnectionService marked as deprecated
Diffstat (limited to 'src/main/java/de/thedevstack')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/utils/XmppSendUtil.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/XmppSendUtil.java b/src/main/java/de/thedevstack/conversationsplus/utils/XmppSendUtil.java
index 74e65857..d4a555f2 100644
--- a/src/main/java/de/thedevstack/conversationsplus/utils/XmppSendUtil.java
+++ b/src/main/java/de/thedevstack/conversationsplus/utils/XmppSendUtil.java
@@ -4,6 +4,7 @@ import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.xmpp.OnIqPacketReceived;
import eu.siacs.conversations.xmpp.XmppConnection;
import eu.siacs.conversations.xmpp.stanzas.IqPacket;
+import eu.siacs.conversations.xmpp.stanzas.MessagePacket;
import eu.siacs.conversations.xmpp.stanzas.PresencePacket;
/**
@@ -23,4 +24,11 @@ public class XmppSendUtil {
connection.sendPresencePacket(packet);
}
}
+
+ public static void sendMessagePacket(Account account, MessagePacket packet) {
+ XmppConnection connection = account.getXmppConnection();
+ if (connection != null) {
+ connection.sendMessagePacket(packet);
+ }
+ }
}