Mercurial > prosody-modules
comparison mod_mam_muc/mod_mam_muc.lua @ 2949:39994c6bb314
mod_mam_muc: Advertise mam:1 instead of mam:2 if not using new MUC code [fixes #1118]
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 26 Mar 2018 08:05:22 +0100 |
parents | b69ef062806e |
children | f7ebf8fcd602 |
comparison
equal
deleted
inserted
replaced
2948:7646f565c8ca | 2949:39994c6bb314 |
---|---|
28 local rooms = rawget(mod_muc, "rooms"); | 28 local rooms = rawget(mod_muc, "rooms"); |
29 local each_room = rawget(mod_muc, "each_room") or function() return it.values(rooms); end; | 29 local each_room = rawget(mod_muc, "each_room") or function() return it.values(rooms); end; |
30 local new_muc = not rooms; | 30 local new_muc = not rooms; |
31 if new_muc then | 31 if new_muc then |
32 rooms = module:shared"muc/rooms"; | 32 rooms = module:shared"muc/rooms"; |
33 else | |
34 -- COMPAT: We don't (currently?) support injecting stanza-id | |
35 -- on Prosody 0.10 and prior, which is required by mam:2 | |
36 xmlns_mam = "urn:xmpp:mam:1"; | |
33 end | 37 end |
34 local get_room_from_jid = rawget(mod_muc, "get_room_from_jid") or | 38 local get_room_from_jid = rawget(mod_muc, "get_room_from_jid") or |
35 function (jid) | 39 function (jid) |
36 return rooms[jid]; | 40 return rooms[jid]; |
37 end | 41 end |