examples/lm/tune.lua
author Myhailo Danylenko <isbear@ukrpost.net>
Sat, 13 Oct 2012 20:57:03 +0300
changeset 137 4fda19d05965
parent 71 eb6edac301ac
permissions -rw-r--r--
Add main.hook_run


-- USER TUNE (XEP-0118)

-- library

local pep = require 'lm.pep'

--

local F = { }

function F.publish ( conn, success, fail, data )
	local item = { xmlns = 'http://jabber.org/protocol/tune' }
	if data then
		for key, value in pairs ( data ) do
			item[key] = { value }
		end
	end
	pep.publish ( conn, 'http://jabber.org/protocol/tune', { tune = item }, success, fail )
end

return F

-- vim: se ts=4: --