Mercurial > prosody-modules
comparison mod_mam_muc/mod_mam_muc.lua @ 1145:5a00f9bec6e7
mod_mam_muc: Send item-not-found if the requested room does not exist
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 10 Aug 2013 21:32:21 +0200 |
parents | ccb0c5afe658 |
children | 9fa89dc7a86f |
comparison
equal
deleted
inserted
replaced
1144:ccb0c5afe658 | 1145:5a00f9bec6e7 |
---|---|
63 local room = stanza.attr.to; | 63 local room = stanza.attr.to; |
64 local query = stanza.tags[1]; | 64 local query = stanza.tags[1]; |
65 | 65 |
66 local room_obj = rooms[room]; | 66 local room_obj = rooms[room]; |
67 if not room_obj then | 67 if not room_obj then |
68 return -- FIXME not found | 68 return origin.send(st.error_reply(stanza, "cancel", "item-not-found")) |
69 end | 69 end |
70 local from = jid_bare(stanza.attr.from); | 70 local from = jid_bare(stanza.attr.from); |
71 | 71 |
72 -- Banned or not a member of a members-only room? | 72 -- Banned or not a member of a members-only room? |
73 if room_obj._affiliations[from] == "outcast" | 73 if room_obj._affiliations[from] == "outcast" |