Commit 3c4b0693 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[GATE-13] Added support for incoming AIM/ICQ typing notifications thanks to nikitine's patch!

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6281 b35dd754-fafc-0310-a699-88a17e54d16e
parent 008f7adf
...@@ -22,6 +22,7 @@ import org.xmpp.packet.Message; ...@@ -22,6 +22,7 @@ import org.xmpp.packet.Message;
import org.xmpp.packet.Presence; import org.xmpp.packet.Presence;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
import org.xmpp.packet.PacketError; import org.xmpp.packet.PacketError;
import org.dom4j.Element;
import net.kano.joscar.ByteBlock; import net.kano.joscar.ByteBlock;
import net.kano.joscar.OscarTools; import net.kano.joscar.OscarTools;
import net.kano.joscar.BinaryTools; import net.kano.joscar.BinaryTools;
...@@ -38,6 +39,7 @@ import net.kano.joscar.snaccmd.conn.*; ...@@ -38,6 +39,7 @@ import net.kano.joscar.snaccmd.conn.*;
import net.kano.joscar.snaccmd.*; import net.kano.joscar.snaccmd.*;
import net.kano.joscar.snaccmd.icbm.RecvImIcbm; import net.kano.joscar.snaccmd.icbm.RecvImIcbm;
import net.kano.joscar.snaccmd.icbm.InstantMessage; import net.kano.joscar.snaccmd.icbm.InstantMessage;
import net.kano.joscar.snaccmd.icbm.TypingCmd;
import net.kano.joscar.snaccmd.buddy.BuddyStatusCmd; import net.kano.joscar.snaccmd.buddy.BuddyStatusCmd;
import net.kano.joscar.snaccmd.buddy.BuddyOfflineCmd; import net.kano.joscar.snaccmd.buddy.BuddyOfflineCmd;
import net.kano.joscar.ratelim.RateLimitingQueueMgr; import net.kano.joscar.ratelim.RateLimitingQueueMgr;
...@@ -167,6 +169,24 @@ public abstract class BasicFlapConnection extends BaseFlapConnection { ...@@ -167,6 +169,24 @@ public abstract class BasicFlapConnection extends BaseFlapConnection {
p.setFrom(oscarSession.getTransport().convertIDToJID(boc.getScreenname())); p.setFrom(oscarSession.getTransport().convertIDToJID(boc.getScreenname()));
oscarSession.getTransport().sendPacket(p); oscarSession.getTransport().sendPacket(p);
} }
else if (cmd instanceof TypingCmd) {
TypingCmd tc = (TypingCmd) cmd;
String sn = tc.getScreenname();
Message mTypingEvent = new Message();
mTypingEvent.setTo(oscarSession.getJIDWithHighestPriority());
mTypingEvent.setFrom(
oscarSession.getTransport().convertIDToJID(sn));
Element eEvent =
mTypingEvent.addChildElement("x", "jabber:x:event");
eEvent.addElement("id");
if (tc.getTypingState() == TypingCmd.STATE_TYPING) {
eEvent.addElement("composing");
}
oscarSession.getTransport().sendPacket(mTypingEvent);
}
} }
protected void handleSnacResponse(SnacResponseEvent e) { protected void handleSnacResponse(SnacResponseEvent e) {
......
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