#331 Removing an item from roster does not send unavailable to contact
Reporter
oli.obk
Owner
Zash
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Type-Defect
Milestone-0.10
Status-Fixed
Difficulty-Easy
Compliance
oli.obk
on
http://xmpp.org/rfcs/rfc3921.html#sub section 6.8
When the user removes a contact from his or her roster by setting the 'subscription' attribute to a value of "remove", the user's server (1) MUST automatically cancel any existing presence subscription between the user and the contact (both 'to' and 'from' as appropriate); (2) MUST remove the roster item from the user's roster and inform all of the user's available resources that have requested the roster of the roster item removal; (3) MUST inform the resource that initiated the removal of success; and (4) SHOULD send unavailable presence from all of the user's available resources to the contact:
MattJ
on
Changes
tags Milestone-0.10
Tobias M
on
From the current RFC:
http://xmpp.org/rfcs/rfc6121.html#sub-cancel-outbound "…the contact's server MUST route or deliver both presence notifications of type "unavailable" and presence stanzas of type "unsubscribed" to the user and MUST send a roster push to the contact."
title[RFC3921] removing an item from roster does not notify contact Removing an item from roster does not send unavailable to contact
Zash
on
Prosody does indeed not send unavailable presence. This seems to be simply because mod_roster does not set the 'preevents' flag. If that is changed, mod_presence takes care of it.
Changes
tags Status-Accepted Difficulty-Easy
Zash
on
However, that sends a bunch of roster pushes for intermediate states. But duplicating the presence broadcast code from mod_presence in mod_roster wouldn't be right.
http://xmpp.org/rfcs/rfc3921.html#sub section 6.8 When the user removes a contact from his or her roster by setting the 'subscription' attribute to a value of "remove", the user's server (1) MUST automatically cancel any existing presence subscription between the user and the contact (both 'to' and 'from' as appropriate); (2) MUST remove the roster item from the user's roster and inform all of the user's available resources that have requested the roster of the roster item removal; (3) MUST inform the resource that initiated the removal of success; and (4) SHOULD send unavailable presence from all of the user's available resources to the contact:
From the current RFC: http://xmpp.org/rfcs/rfc6121.html#sub-cancel-outbound "…the contact's server MUST route or deliver both presence notifications of type "unavailable" and presence stanzas of type "unsubscribed" to the user and MUST send a roster push to the contact."
Odd, wouldn't http://xmpp.org/rfcs/rfc6121.html#roster-delete be the relevant section here?
Changes[RFC3921] removing an item from roster does not notify contactRemoving an item from roster does not send unavailable to contactProsody does indeed not send unavailable presence. This seems to be simply because mod_roster does not set the 'preevents' flag. If that is changed, mod_presence takes care of it.
ChangesHowever, that sends a bunch of roster pushes for intermediate states. But duplicating the presence broadcast code from mod_presence in mod_roster wouldn't be right.
ChangesMattJZashFixed in http://hg.prosody.im/0.10/rev/ba32289e8d0b
Changes