--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/lm/mood.lua Tue Mar 31 18:35:34 2009 +0300
@@ -0,0 +1,25 @@
+
+-- USER MOOD (XEP-0107)
+
+-- library
+
+local pep = require 'lm.pep'
+
+--
+
+local F = { }
+
+function F.publish ( conn, success, fail, mood, message )
+ local item = { xmlns = 'http://jabber.org/protocol/mood' }
+ if mood then
+ item[mood] = { }
+ end
+ if message then
+ item.text = { message }
+ end
+ pep.publish ( conn, 'http://jabber.org/protocol/mood', { mood = item }, success, fail )
+end
+
+return F
+
+-- vim: se ts=4: --