Fixed sending typing info

cusax-fix
Damian Minkov 19 years ago
parent 6d2b4993fc
commit 30aa7bce71

@ -137,9 +137,19 @@ public void sendTypingNotification(Contact notifiedContact, int typingState)
if(typingState == OperationSetTypingNotifications.STATE_TYPING)
{
yahooProvider.getYahooSession().
keyTyped(notifiedContact.getAddress());
keyTyped(notifiedContact.getAddress(),
yahooProvider.getAccountID().getUserID());
}
else
if(typingState == OperationSetTypingNotifications.STATE_STOPPED ||
typingState == OperationSetTypingNotifications.STATE_PAUSED)
{
yahooProvider.getYahooSession().
stopTyping(notifiedContact.getAddress(),
yahooProvider.getAccountID().getUserID());
}
}
/**

@ -35,4 +35,28 @@ public static String getYahooUserID(String id)
? id.substring(0, id.indexOf("@"))
: id;
}
/**
* Sending typing notifications
* @param to user we are notifing
* @param from our user id
*/
void keyTyped(String to, String from)
{
try {
transmitNotify(to, from, true, " ", NOTIFY_TYPING);
}catch(IOException e){}
}
/**
* Sending stop typing notifications
* @param to user we are notifing
* @param from our user id
*/
void stopTyping(String to, String from)
{
try {
transmitNotify(to, from, false, " ", NOTIFY_TYPING);
}catch(IOException e){}
}
}

@ -84,8 +84,7 @@ public void start(BundleContext context)
addTest(TestOperationSetBasicInstantMessaging.suite());
// Sending typing notifications doesn't work for now
//addTest(TestOperationSetTypingNotifications.suite());
addTest(TestOperationSetTypingNotifications.suite());
}
addTest(TestAccountUninstallation.suite());

Loading…
Cancel
Save