Changeset

1756:b2291156a9c2

MUC: Added service discovery replies for rooms.
author Waqas Hussain <waqas20@gmail.com>
date Mon, 07 Sep 2009 20:54:53 +0500
parents 1755:1614e8e62ad5
children 1757:157e438823ba
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Mon Sep 07 20:53:33 2009 +0500
+++ b/plugins/muc/muc.lib.lua	Mon Sep 07 20:54:53 2009 +0500
@@ -184,8 +184,12 @@
 	end
 end
 
-local function room_get_disco_info(self, stanza) end
-local function room_get_disco_items(self, stanza) end
+local function room_get_disco_info(self, stanza)
+	return st.reply(stanza):query("http://jabber.org/protocol/disco#info"):tag("identity", {category="conference", type="text"});
+end
+local function room_get_disco_items(self, stanza)
+	return st.reply(stanza):query("http://jabber.org/protocol/disco#items");
+end
 function room_mt:set_subject(current_nick, subject)
 	-- TODO check nick's authority
 	if subject == "" then subject = nil; end