Note that there are some explanatory texts on larger screens.

plurals
  1. POstrophe.js PEP handler not attaching properly
    primarykey
    data
    text
    <p>I have been using a PEP plugin (found here: <a href="https://github.com/flosse/strophejs-plugins/blob/master/pep/strophe.pep.js" rel="nofollow">https://github.com/flosse/strophejs-plugins/blob/master/pep/strophe.pep.js</a>) to connect to a users node however I am having some trouble. When my connected block is called I do the following:</p> <pre><code>XMPP.connection.send($pres()); XMPP.getRoster(); XMPP.connection.addHandler(XMPP.getPresence, null, "presence"); </code></pre> <p>When I receive a subscribed back from the JID of the node I am attempting to access (thus having bidirectional subscription) I execute:</p> <pre><code>XMPP.connection.pep.subscribe(JID, node, function(){console.log("SUCCESS: Successfully subscribed to " + JID + "'s node " + node);}, function(){console.log("FAILURE: Unsuccessfully subscribed to " + JID + "'s node " + node);}, XMPP.onMessage, true); </code></pre> <p>Where the JID and node are both valid. I receive the SUCCESS in the console however the event handler onMessage is not attached properly. I have debugging set so I can see incoming and outgoing stanzas and I do not receive anything from the node (which I know is being posted on a regular interval). I am not quite sure why this is happening.</p> <p>If I remove everything from the connected block and simply manually create bidirectional subscription from the web console and add the XMPP.connection.pep.subscribe in that now empty block it works fine.</p> <p>I have tried multiple PEP and pubsub plugins and get the same behavior. I'm at a road block and would greatly appreciate anyones input! Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload