Skip to content

Instantly share code, notes, and snippets.

@zeen
Created February 21, 2010 13:31
Show Gist options
  • Save zeen/310310 to your computer and use it in GitHub Desktop.
Save zeen/310310 to your computer and use it in GitHub Desktop.
local bookmark = {
jid = "[email protected]";
name = "Jabber Support Room";
};
local datamanager = require "util.datamanager";
local st = require "util.stanza";
module:hook("user-registered", function(event)
module:log("debug", "Adding support contact");
local tag = st.stanza("storage", { xmlns = "storage:bookmarks" })
:tag("conference", { jid = bookmark.jid, name = bookmark.name });
local data = { [tag.name..":"..tag.att.xmlns] = st.preserialize(tag) };
datamanager.store(event.username, event.host, "private", data);
end);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment