examples/lm/tune.lua
author Myhailo Danylenko <isbear@ukrpost.net>
Sat, 05 Mar 2016 18:34:12 +0200
changeset 149 be2ec9bb72df
parent 71 eb6edac301ac
permissions -rw-r--r--
Added tag v0.0.4 for changeset b222f4d111d9


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