diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTypingNotificationsJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTypingNotificationsJabberImpl.java index f1db8264a..1ea8712a1 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTypingNotificationsJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetTypingNotificationsJabberImpl.java @@ -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); diff --git a/src/net/java/sip/communicator/util/Logger.java b/src/net/java/sip/communicator/util/Logger.java index 9046782f5..be30d2dd8 100644 --- a/src/net/java/sip/communicator/util/Logger.java +++ b/src/net/java/sip/communicator/util/Logger.java @@ -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)); - } diff --git a/test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetTypingNotifications.java b/test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetTypingNotifications.java index fbf15ced1..5fcb50213 100644 --- a/test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetTypingNotifications.java +++ b/test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetTypingNotifications.java @@ -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