Mercurial > prosody-hg
comparison plugins/muc/muc.lib.lua @ 3258:bc07564bec6d
MUC: Added room:set_persistent(boolean) and room:is_persistent().
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Sun, 13 Jun 2010 21:38:31 +0500 |
| parents | fae054e15e03 |
| children | a5b9209efb23 |
comparison
equal
deleted
inserted
replaced
| 3257:fae054e15e03 | 3258:bc07564bec6d |
|---|---|
| 271 if self.save then self:save(true); end | 271 if self.save then self:save(true); end |
| 272 end | 272 end |
| 273 end | 273 end |
| 274 function room_mt:is_members_only() | 274 function room_mt:is_members_only() |
| 275 return self._data.members_only; | 275 return self._data.members_only; |
| 276 end | |
| 277 function room_mt:set_persistent(persistent) | |
| 278 persistent = persistent and true or nil; | |
| 279 if self._data.persistent ~= persistent then | |
| 280 self._data.persistent = persistent; | |
| 281 if self.save then self:save(true); end | |
| 282 end | |
| 283 end | |
| 284 function room_mt:is_persistent() | |
| 285 return self._data.persistent; | |
| 276 end | 286 end |
| 277 | 287 |
| 278 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc | 288 function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc |
| 279 local from, to = stanza.attr.from, stanza.attr.to; | 289 local from, to = stanza.attr.from, stanza.attr.to; |
| 280 local room = jid_bare(to); | 290 local room = jid_bare(to); |
