Comparison

plugins/muc/muc.lib.lua @ 8465:0ec72e67f797

MUC: Always send subject message, even if it is empty (fixes #1053)
author Kim Alvefur <zash@zash.se>
date Sat, 09 Dec 2017 14:39:48 +0100
parent 7383:69827ee1f951
child 8466:df970f76c720
child 8474:7ad9d7c4161c
comparison
equal deleted inserted replaced
8233:4e7269c53659 8465:0ec72e67f797
205 local msg = history[i].stanza; 205 local msg = history[i].stanza;
206 msg.attr.to = to; 206 msg.attr.to = to;
207 self:_route_stanza(msg); 207 self:_route_stanza(msg);
208 end 208 end
209 end 209 end
210 if self._data['subject'] then 210 self:_route_stanza(st.message({type='groupchat', from=self._data['subject_from'] or self.jid, to=to}):tag("subject"):text(self._data['subject']));
211 self:_route_stanza(st.message({type='groupchat', from=self._data['subject_from'] or self.jid, to=to}):tag("subject"):text(self._data['subject']));
212 end
213 end 211 end
214 212
215 function room_mt:get_disco_info(stanza) 213 function room_mt:get_disco_info(stanza)
216 local count = 0; for _ in pairs(self._occupants) do count = count + 1; end 214 local count = 0; for _ in pairs(self._occupants) do count = count + 1; end
217 return st.reply(stanza):query("http://jabber.org/protocol/disco#info") 215 return st.reply(stanza):query("http://jabber.org/protocol/disco#info")