Commit 6394d712 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[GATE-136] Fixed issue with lack of subscribed packet.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6222 b35dd754-fafc-0310-a699-88a17e54d16e
parent d78dc9d2
......@@ -171,10 +171,28 @@ public class MSNListener extends MsnAdapter {
*/
public void contactAddCompleted(MsnMessenger messenger, MsnContact contact) {
Log.debug("MSN: Contact add completed: "+contact);
Presence p = new Presence();
p.setType(Presence.Type.subscribed);
p.setTo(msnSession.getJID());
p.setFrom(msnSession.getTransport().convertIDToJID(contact.getEmail().toString()));
msnSession.getTransport().sendPacket(p);
msnSession.storeFriend(contact);
msnSession.completedPendingContactAdd(contact);
}
/**
* A contact we removed has been removed from the server.
*/
public void contactRemoveCompleted(MsnMessenger messenger, MsnContact contact) {
Log.debug("MSN: Contact remove completed: "+contact);
Presence p = new Presence();
p.setType(Presence.Type.unsubscribed);
p.setTo(msnSession.getJID());
p.setFrom(msnSession.getTransport().convertIDToJID(contact.getEmail().toString()));
msnSession.getTransport().sendPacket(p);
msnSession.unstoreFriend(contact);
}
/**
* A group we added has been added to the server.
*/
......@@ -184,6 +202,14 @@ public class MSNListener extends MsnAdapter {
msnSession.completedPendingGroupAdd(group);
}
/**
* A group we removed has been removed from the server.
*/
public void groupRemoveCompleted(MsnMessenger messenger, MsnGroup group) {
Log.debug("MSN: Group remove completed: "+group);
msnSession.unstoreGroup(group);
}
/**
* Owner status has changed.
*/
......
......@@ -142,6 +142,15 @@ public class MSNSession extends TransportSession {
msnContacts.put(msnContact.getEmail().toString(), msnContact);
}
/**
* Removes information about a person from the user's contact list.
*
* @param msnContact MSN contact we are removing a copy of.
*/
public void unstoreFriend(MsnContact msnContact) {
msnContacts.remove(msnContact.getEmail().toString());
}
/**
* Records information about a group on the user's contact list.
*
......@@ -151,6 +160,15 @@ public class MSNSession extends TransportSession {
msnGroups.put(msnGroup.getGroupName(), msnGroup);
}
/**
* Removes information about a group from the user's contact list.
*
* @param msnGroup MSN group we are removing a copy of.
*/
public void unstoreGroup(MsnGroup msnGroup) {
msnGroups.remove(msnGroup.getGroupName());
}
/**
* Records a member of a pending new group that will be added later.
*
......
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