powered by Jive Software

Server is not sending Subscription approval notification

I am not be able to receive Subscription approval notification from the server when owner approves the subscriber

following is the flow i have run the test in PSI xml.

**A request for subscription **

<iq type='set'
    from='88f37b90@example.com'
    to='pubsub.example.com'
    id='sub1'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <subscribe
        node='fdf72c24/loc'
        jid='88f37b90@example.com'/>
  </pubsub>
</iq>

immideate reply to subscriber

<iq from="pubsub.example.com" type="result" id="sub1" to="88f37b90@example.com"
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<subscription node="fdf72c24/loc" subscription="pending" subid="Howb8IplBlxCYKm1b9jb53RO909v09RF7QHJn3M0" jid="88f37b90@example.com">
<subscribe-options/>
</subscription>
</pubsub>
</iq>

owner will get following response from server i.e. a request for subscription autorization

**
**

<message from="pubsub.example.com" to="fdf72c24@example.com" id="xxx">
<x xmlns="jabber:x:data" type="form">
<title>PubSub subscriber request</title>
<instructions>Use the following form to approve or deny the subscription request.</instructions>
<field type="hidden" var="FORM_TYPE">
<value>http://jabber.org/protocol/pubsub#subscribe_authorization</value>
</field>
<field type="hidden" var="pubsub#subid">
<value>Howb8IplBlxCYKm1b9jb53RO909v09RF7QHJn3M0</value>
</field>
<field type="text-single" label="Node ID" var="pubsub#node">
<value>fdf72c24/loc</value>
</field>
<field type="jid-single" label="Subscriber Address" var="pubsub#subscriber_jid">
<value>88f37b90@example.com</value>
</field>
<field type="boolean" label="Allow this JID to subscribe to this pubsub node?" var="pubsub#allow">
<value>0</value>
</field>
</x>
</message>

Now owner will approve the request by setting pubsub#allow by 1

<message to="pubsub.example.com" id="xxx">
<x xmlns="jabber:x:data" type="submit">
<field type="hidden" var="FORM_TYPE">
<value>http://jabber.org/protocol/pubsub#subscribe_authorization</value>
</field>
<field type="hidden" var="pubsub#subid">
<value>Howb8IplBlxCYKm1b9jb53RO909v09RF7QHJn3M0</value>
</field>
<field type="text-single" var="pubsub#node">
<value>fdf72c24/loc</value>
</field>
<field type="jid-single" var="pubsub#subscriber_jid">
<value>88f37b90@example.com</value>
</field>
<field type="boolean" var="pubsub#allow">
<value>1</value>
</field>
</x>
</message>

but the issue is once i send the approved request for subscription authorization , i am not be able to get the notification from server saying that

the node is subscribed to a requested subscriber.

as accroding to XEP-0060 protocol following stanza must be received when owner sends the possitive approval to server but i am not getting any approval from server to the owner.

<message
    from='pubsub.shakespeare.lit'
    to='horatio@denmark.lit'
    id='approvalnotify1'>
  <event xmlns='http://jabber.org/protocol/pubsub#event'>
    <subscription node='princely_musings' jid='horatio@denmark.lit' subscription='subscribed'/>
  </event>
</message>

it seems while configuring node notify_sub is not being supported by openfire that could be a reason.

but m still seeking for a solid answer

Can anyone please help me over this , as m in between my project and now i can’t even switch to anothe library

I have tested this againts openfire 3.7 and ejabber too with smack but still facing the same problem ,

any one has faced it yet ?

need a real help

I have updated the openfire from 3.7 to 3.8 , but still no notification is being sent to the subscriber when owner approves the subscription request.

this is getting frustrating , really don;t know what to do , as in application subscription type is Authorize

Any senior member or a developer please look over this n i would be pretty much greatful to them.

i can see in NodeSubscription.java

http://fisheye.igniterealtime.org/browse/openfire/trunk/src/java/org/jivesoftwar e/openfire/pubsub/NodeSubscription.java?r=13437

it only sends last published item when owner approves the subscription request and doesnt send the state subscribed to subscriber