Created
February 21, 2010 13:31
-
-
Save zeen/310310 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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