Commit 5825ed92 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Adding some helper functions.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6282 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3c4b0693
......@@ -1365,6 +1365,34 @@ public abstract class BaseTransport implements Component, RosterEventListener {
}
}
/**
* Sends a simple message throught he component manager.
*
* @param to Who the message is for.
* @param from Who the message is from.
* @param msg Message to be send.
* @param type Type of message to be sent.
*/
public void sendMessage(JID to, JID from, String msg, Message.Type type) {
Message m = new Message();
m.setType(type);
m.setFrom(from);
m.setTo(to);
m.setBody(msg);
sendPacket(m);
}
/**
* Sends a simple message throught he component manager.
*
* @param to Who the message is for.
* @param from Who the message is from.
* @param msg Message to be send.
*/
public void sendMessage(JID to, JID from, String msg) {
sendMessage(to, from, msg, Message.Type.chat);
}
/**
* Intercepts roster additions related to the gateway and flags them as non-persistent.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment