Comparison

plugins/muc/muc.lib.lua @ 7352:50b24b3476e6

MUC: Provide a noop stub room:save() method
author Kim Alvefur <zash@zash.se>
date Thu, 14 Apr 2016 21:23:09 +0200
parent 7347:795a95258292
child 7353:ca31d3271cf8
comparison
equal deleted inserted replaced
7350:24e2369b67f9 7352:50b24b3476e6
32 local room_mt = {}; 32 local room_mt = {};
33 room_mt.__index = room_mt; 33 room_mt.__index = room_mt;
34 34
35 function room_mt:__tostring() 35 function room_mt:__tostring()
36 return "MUC room ("..self.jid..")"; 36 return "MUC room ("..self.jid..")";
37 end
38
39 function room_mt.save()
40 -- overriden by mod_muc.lua
37 end 41 end
38 42
39 function room_mt:get_occupant_jid(real_jid) 43 function room_mt:get_occupant_jid(real_jid)
40 return self._jid_nick[real_jid] 44 return self._jid_nick[real_jid]
41 end 45 end
693 event.field, event.value = submitted_field, fields[submitted_field]; 697 event.field, event.value = submitted_field, fields[submitted_field];
694 module:fire_event("muc-config-submitted/"..submitted_field, event); 698 module:fire_event("muc-config-submitted/"..submitted_field, event);
695 end 699 end
696 event.field, event.value = nil, nil; 700 event.field, event.value = nil, nil;
697 701
698 if self.save then self:save(true); end 702 self:save(true);
699 origin.send(st.reply(stanza)); 703 origin.send(st.reply(stanza));
700 704
701 if next(event.status_codes) then 705 if next(event.status_codes) then
702 local msg = st.message({type='groupchat', from=self.jid}) 706 local msg = st.message({type='groupchat', from=self.jid})
703 :tag('x', {xmlns='http://jabber.org/protocol/muc#user'}) 707 :tag('x', {xmlns='http://jabber.org/protocol/muc#user'})