Commit 0cefb349 authored by daryl herzmann's avatar daryl herzmann

Merge pull request #106 from tevans/OF-179-PR

OF-179: Publish presence updates for group changes
parents 5bb42888 dbccdb1e
......@@ -2706,22 +2706,29 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
@Override
public void memberAdded(Group group, Map params) {
applyAffiliationChange(getRole(), new JID((String)params.get("member")), null);
applyAffiliationChangeAndSendPresence(new JID((String)params.get("member")));
}
@Override
public void memberRemoved(Group group, Map params) {
applyAffiliationChange(getRole(), new JID((String)params.get("member")), null);
applyAffiliationChangeAndSendPresence(new JID((String)params.get("member")));
}
@Override
public void adminAdded(Group group, Map params) {
applyAffiliationChange(getRole(), new JID((String)params.get("admin")), null);
applyAffiliationChangeAndSendPresence(new JID((String)params.get("admin")));
}
@Override
public void adminRemoved(Group group, Map params) {
applyAffiliationChange(getRole(), new JID((String)params.get("admin")), null);
applyAffiliationChangeAndSendPresence(new JID((String)params.get("admin")));
}
private void applyAffiliationChangeAndSendPresence(JID groupMember) {
List<Presence> presences = applyAffiliationChange(getRole(), groupMember, null);
for (Presence presence : presences) {
send(presence);
}
}
@Override
......
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