Stop sending typing notifications through the XEP-0022 mechanism as we now handle them through XEP-0085 and having both is redundant and causes our XMPP unit tests to fail.

cusax-fix
Emil Ivov 17 years ago
parent 00d10077de
commit a05f42827f

@ -165,7 +165,13 @@ public void sendTypingNotification(Contact notifiedContact, int typingState)
"The specified contact is not a Jabber contact."
+ notifiedContact);
/**
* Emil Ivov: We used to use this in while we were still using XEP-0022
* to send typing notifications. I am commenting it out today on
* 2008-08-20 as we now also support XEP-0085 (see below) and using both
* mechanisms sends double notifications which, apart from simply being
* redundant, is also causing the jabber slick to fail.
*
String packetID =
(String)packetIDsTable.get(notifiedContact.getAddress());
@ -186,6 +192,7 @@ else if(typingState == STATE_STOPPED)
packetIDsTable.remove(notifiedContact.getAddress());
}
}
*/
//now handle XEP-0085
sendXep85ChatState(notifiedContact, typingState);

@ -1,5 +1,9 @@
package net.java.sip.communicator.util;
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/package net.java.sip.communicator.util;
import java.util.logging.*;
/**
@ -62,7 +66,6 @@ public static Logger getLogger(String name)
throws NullPointerException
{
return new Logger(java.util.logging.Logger.getLogger(name));
}

@ -253,6 +253,10 @@ public void testTypingNotificationsEventDelivery()
assertTrue("Number of typing events received was zero."
, evtCollector.collectedEvents.size() > 0);
logger.trace("We have collected " + evtCollector.collectedEvents.size()
+ " typing notifications.");
logger.trace("Notifications: " + evtCollector.collectedEvents);
evt = (TypingNotificationEvent)evtCollector.collectedEvents.get(0);
assertEquals("Source of the typing notification event"
@ -265,7 +269,7 @@ public void testTypingNotificationsEventDelivery()
}
/**
* Simply collects allre received events and provides a mechanisim for
* Simply collects all received events and provides a mechanism for
* waiting for the next event.
*/
private class TypingEventCollector implements TypingNotificationsListener

Loading…
Cancel
Save