Fixed
Details
Assignee
Gaston DombiakGaston DombiakReporter
wrootwrootComponents
Fix versions
Affects versions
Priority
Major
Details
Details
Assignee
Gaston Dombiak
Gaston DombiakReporter
wroot
wrootComponents
Fix versions
Affects versions
Priority
Created September 22, 2009 at 12:23 PM
Updated February 1, 2010 at 3:18 AM
Resolved November 6, 2009 at 4:50 PM
http://www.igniterealtime.org/community/message/196266
Currently when you uncheck the "broadcast presence for" for a certain role (say visitor), their join presence is correctly supressed, but their unavailable presence is not when they leave the room. This is because Openfire (correctly) sets their role to none upon departure.
Unfortunately this is done right before the check to see if their presence should be broadcast, resulting in the presence always being sent to the entire room, despite them previously being a visitor.
To solve this, I created a shouldBroadcastPresence function, and check to see if the user's original presence should be broadcast. If not, the new presence (with role=none) is only sent to the user, and not the entire room. This also fixes the issue listed above where unavailable presence packets were being sent twice upon user departure.