Skip to content

Instantly share code, notes, and snippets.

@tsudot
Created May 12, 2011 20:33
Show Gist options
  • Save tsudot/969383 to your computer and use it in GitHub Desktop.
Save tsudot/969383 to your computer and use it in GitHub Desktop.
local st = require "util.stanza";
local reply = st.stanza("message");
reply:tag("body"):text("Enter the valid keys"):up()
:tag("x", {xmlns="jabber:x:oob"}):tag("url"):text("some_url"):up():up()
:tag("captcha", {xmlns="urn:xmpp:captcha"}):up();
print (reply);
-- <message><body>Enter the valid keys</body><x xmlns='jabber:x:oob'>
-- <url>some_url</url></x>
-- <captcha xmlns='urn:xmpp:captcha'/></message>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment