{"issue":{"created_at":"2011-11-21T03:23:19Z","state":"open","updated_at":"2011-11-29T17:26:30Z","user":{"gravatar_id":"aa82252f65a16f9a13e108765571d0db","id":7893,"url":"https://api.github.com/users/tomlion","avatar_url":"https://secure.gravatar.com/avatar/aa82252f65a16f9a13e108765571d0db?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"tomlion"},"comments":2,"body":"I didn't get expected result when I publish a message to user's PEP node.\r\nSupposed that the user A had a subscription to B's presence, but B didn't have a subscription to A's presence.\r\nWhen B publish an item to his PEP node, A should get a notification, but unfortunately, A got nothing.\r\nAnd if A publish an Item to his PEP node, B got a notification instead.\r\n\r\nHere is what I got when I look through the code:\r\nEjabberd use mod_caps:c2s_broadcast_recipients to count broadcast Recipients, but I thought it didn't work right.\r\nBecause C2SState#state.cap_resources is the cache which store users contact's status, so the data in it are my subscriptions, not subscriptions to me.","assignee":null,"id":2301062,"labels":[],"pull_request":{"patch_url":"https://github.com/processone/ejabberd/pull/23.patch","html_url":"https://github.com/processone/ejabberd/pull/23","diff_url":"https://github.com/processone/ejabberd/pull/23.diff"},"number":23,"title":"Incorrect PEP node's recipients ","closed_at":null,"html_url":"https://github.com/processone/ejabberd/issues/23","url":"https://api.github.com/repos/processone/ejabberd/issues/23","milestone":null},"action":"created","comment":{"created_at":"2011-11-29T17:26:30Z","updated_at":"2011-11-29T17:26:30Z","user":{"gravatar_id":"aa82252f65a16f9a13e108765571d0db","id":7893,"url":"https://api.github.com/users/tomlion","avatar_url":"https://secure.gravatar.com/avatar/aa82252f65a16f9a13e108765571d0db?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"tomlion"},"body":"No. It is a quick fix, and it has two problems: \r\n1. state.pres_f are jids without resource so get_broadcast_recipients can only return jids without resources\r\n2. get_broadcast_recipients didn't cache recipients, it need to calculate every time.\r\n\r\nWe are still looking forward a better and more efficient solution.","id":2937039,"url":"https://api.github.com/repos/processone/ejabberd/issues/comments/2937039"}}