Another detail.
When I ask the subscription option form, the resulting form should be wrapped into PUBSUB and OPTIONS tags, according to paragraph 6.3.3:
<?xml version="1.0"?>
<xml>
<iq id="3" from="clochix" to="pubsub" type="get">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<options node="/tmp" jid="clochix" subid="4E336F469C59F"/>
</pubsub>
</iq>
</xml>
<?xml version="1.0"?>
<xml>
<iq from="pubsub" to="clochix" id="3" type="result">
<x xmlns="jabber:x:data">
<field var="FORM_TYPE" type="hidden">
<value>http://jabber.org/protocol/pubsub#subscribe_options</value>
</field>
I think I should get:
<?xml version="1.0"?>
<xml>
<iq from="pubsub" to="clochix" id="3" type="result">
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<options node='/tmp' jid='clochix'>
<x xmlns="jabber:x:data">
Here is a small patch for
Here is a small patch for ejabberd trunk SVN that I've written following your description:
I didn't try it and I am not mod_pubsub expert.
If you try it, please comment if it solves the problem completely or not.
Another try
Thanks. Actually, it didn't work and throw an error.
Here's another try :
The node attribute is missing, I don't know how to convert from NodeID to a node name.
Can you try this patch? It
Can you try this patch? It includes your improvements and the NodeID string. Again, I didn't test it.
We are almost there. This one
We are almost there.
This one works for me:
Please note that pubsub_subscription:get_options_xform return a tuple {result, xmlelement}, and read_sub should also return a tuple.
Ok, I've committed that last
Ok, I've committed that last patch to SVN.