Exampple.Xmpp.Envelope (exampple v0.10.6)

Envelope helps to create a function to be stored inside of the Exampple.Router.Conn which will be in use when a response will be processed.

The idea of this module was based on handling the Namespace delegation (XEP-0355) but also the Stanza forwarding (XEP-0297).

This way we process the stanzas wrapped using the Exampple.Router and the configuration provided by our router configuration in a transparent way.

Link to this section Summary

Functions

Handle the stanza inside of a Exampple.Router.Conn provided by the first parameter conn and creates an envelope function with it. The function is placed inside of a new Exampple.Router.Conn parsed with the data provided from the internal stanza. The query provided as second parameter let us detect where is the actual stanza to be propagated and where we have to inject the response.

Link to this section Functions

Link to this function

handle(conn, query)

Handle the stanza inside of a Exampple.Router.Conn provided by the first parameter conn and creates an envelope function with it. The function is placed inside of a new Exampple.Router.Conn parsed with the data provided from the internal stanza. The query provided as second parameter let us detect where is the actual stanza to be propagated and where we have to inject the response.