Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 1756:b2291156a9c2
MUC: Added service discovery replies for rooms.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 07 Sep 2009 20:54:53 +0500 |
parent | 1755:1614e8e62ad5 |
child | 1757:157e438823ba |
comparison
equal
deleted
inserted
replaced
1755:1614e8e62ad5 | 1756:b2291156a9c2 |
---|---|
182 if self._data['subject'] then | 182 if self._data['subject'] then |
183 self:route_stanza(st.message({type='groupchat', from=self.jid, to=to}):tag("subject"):text(self._data['subject'])); | 183 self:route_stanza(st.message({type='groupchat', from=self.jid, to=to}):tag("subject"):text(self._data['subject'])); |
184 end | 184 end |
185 end | 185 end |
186 | 186 |
187 local function room_get_disco_info(self, stanza) end | 187 local function room_get_disco_info(self, stanza) |
188 local function room_get_disco_items(self, stanza) end | 188 return st.reply(stanza):query("http://jabber.org/protocol/disco#info"):tag("identity", {category="conference", type="text"}); |
189 end | |
190 local function room_get_disco_items(self, stanza) | |
191 return st.reply(stanza):query("http://jabber.org/protocol/disco#items"); | |
192 end | |
189 function room_mt:set_subject(current_nick, subject) | 193 function room_mt:set_subject(current_nick, subject) |
190 -- TODO check nick's authority | 194 -- TODO check nick's authority |
191 if subject == "" then subject = nil; end | 195 if subject == "" then subject = nil; end |
192 self._data['subject'] = subject; | 196 self._data['subject'] = subject; |
193 if self.save then self:save(); end | 197 if self.save then self:save(); end |