Software / code / prosody
Comparison
plugins/muc/mod_muc.lua @ 6110:d007b3c49078
plugins/muc/mod_muc: host sessions have a .send these days
| author | daurnimator <quae@daurnimator.com> |
|---|---|
| date | Tue, 18 Mar 2014 18:56:26 -0400 |
| parent | 6109:566aba0482b6 |
| child | 6111:f8b94903be52 |
comparison
equal
deleted
inserted
replaced
| 6109:566aba0482b6 | 6110:d007b3c49078 |
|---|---|
| 211 end | 211 end |
| 212 return room[method](room, origin, stanza); | 212 return room[method](room, origin, stanza); |
| 213 end, -2) | 213 end, -2) |
| 214 end | 214 end |
| 215 | 215 |
| 216 | |
| 217 hosts[module.host].send = function(stanza) -- FIXME do a generic fix | |
| 218 if stanza.attr.type == "result" or stanza.attr.type == "error" then | |
| 219 module:send(stanza); | |
| 220 else error("component.send only supports result and error stanzas at the moment"); end | |
| 221 end | |
| 222 | |
| 223 hosts[module:get_host()].muc = { rooms = rooms }; | 216 hosts[module:get_host()].muc = { rooms = rooms }; |
| 224 | 217 |
| 225 local saved = false; | 218 local saved = false; |
| 226 module.save = function() | 219 module.save = function() |
| 227 saved = true; | 220 saved = true; |