examples/lm/tune.lua
author Myhailo Danylenko <isbear@ukrpost.net>
Tue, 21 Aug 2012 15:44:05 +0300
changeset 130 de560dec87a5
parent 71 eb6edac301ac
permissions -rw-r--r--
Update api docs


-- 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: --