Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 5618:4fd2708fe8df
mod_muc: Remove some old TODO comments
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 21 May 2013 13:21:30 +0100 |
| parents | 2a3341e7ed32 |
| children | 43cc1f95395e |
comparison
equal
deleted
inserted
replaced
| 5617:783078bc111c | 5618:4fd2708fe8df |
|---|---|
| 213 reply:tag("item", {jid = room_jid, name = room_jid:match("/(.*)")}):up(); | 213 reply:tag("item", {jid = room_jid, name = room_jid:match("/(.*)")}):up(); |
| 214 end | 214 end |
| 215 return reply; | 215 return reply; |
| 216 end | 216 end |
| 217 function room_mt:set_subject(current_nick, subject) | 217 function room_mt:set_subject(current_nick, subject) |
| 218 -- TODO check nick's authority | |
| 219 if subject == "" then subject = nil; end | 218 if subject == "" then subject = nil; end |
| 220 self._data['subject'] = subject; | 219 self._data['subject'] = subject; |
| 221 self._data['subject_from'] = current_nick; | 220 self._data['subject_from'] = current_nick; |
| 222 if self.save then self:save(); end | 221 if self.save then self:save(); end |
| 223 local msg = st.message({type='groupchat', from=current_nick}) | 222 local msg = st.message({type='groupchat', from=current_nick}) |
| 846 stanza.attr.from = current_nick; | 845 stanza.attr.from = current_nick; |
| 847 local subject = stanza:get_child_text("subject"); | 846 local subject = stanza:get_child_text("subject"); |
| 848 if subject then | 847 if subject then |
| 849 if occupant.role == "moderator" or | 848 if occupant.role == "moderator" or |
| 850 ( self._data.changesubject and occupant.role == "participant" ) then -- and participant | 849 ( self._data.changesubject and occupant.role == "participant" ) then -- and participant |
| 851 self:set_subject(current_nick, subject); -- TODO use broadcast_message_stanza | 850 self:set_subject(current_nick, subject); |
| 852 else | 851 else |
| 853 stanza.attr.from = from; | 852 stanza.attr.from = from; |
| 854 origin.send(st.error_reply(stanza, "auth", "forbidden")); | 853 origin.send(st.error_reply(stanza, "auth", "forbidden")); |
| 855 end | 854 end |
| 856 else | 855 else |
