Software / code / prosody-modules
Comparison
mod_http_muc_log/mod_http_muc_log.lua @ 1554:8059b7cdaf17
mod_http_muc_log: Make MUC local code identical to mod_mam_muc
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 09 Nov 2014 08:37:43 +0100 |
| parent | 1553:1398d2bbcd42 |
| child | 1555:2e51f70cd7ea |
comparison
equal
deleted
inserted
replaced
| 1553:1398d2bbcd42 | 1554:8059b7cdaf17 |
|---|---|
| 10 | 10 |
| 11 -- Support both old and new MUC code | 11 -- Support both old and new MUC code |
| 12 local mod_muc = module:depends"muc"; | 12 local mod_muc = module:depends"muc"; |
| 13 local rooms = rawget(mod_muc, "rooms"); | 13 local rooms = rawget(mod_muc, "rooms"); |
| 14 local each_room = rawget(mod_muc, "each_room") or function() return it.values(rooms); end; | 14 local each_room = rawget(mod_muc, "each_room") or function() return it.values(rooms); end; |
| 15 if not rooms then | 15 local new_muc = not rooms; |
| 16 if new_muc then | |
| 16 rooms = module:shared"muc/rooms"; | 17 rooms = module:shared"muc/rooms"; |
| 17 end | 18 end |
| 18 local get_room_from_jid = rawget(mod_muc, "get_room_from_jid") or | 19 local get_room_from_jid = rawget(mod_muc, "get_room_from_jid") or |
| 19 function (jid) | 20 function (jid) |
| 20 return rooms[jid]; | 21 return rooms[jid]; |