Mercurial > prosody-modules
comparison mod_vcard_muc/mod_vcard_muc.lua @ 4043:a533abe6ffd0
mod_vcard_muc: Fix #1414 issue with nil room being queried when a stanza with a nonexisting MUC localpart was sent
author | Michel Le Bihan <michel@lebihan.pl> |
---|---|
date | Mon, 08 Jun 2020 18:39:16 +0200 |
parents | 3e0f4d727825 |
children | 3f3b672b7616 |
comparison
equal
deleted
inserted
replaced
4039:2af0301af734 | 4043:a533abe6ffd0 |
---|---|
58 local session, stanza = event.origin, event.stanza; | 58 local session, stanza = event.origin, event.stanza; |
59 | 59 |
60 local room_jid = stanza.attr.to; | 60 local room_jid = stanza.attr.to; |
61 local room_node = jid_split(room_jid); | 61 local room_node = jid_split(room_jid); |
62 local room = get_room_from_jid(room_jid); | 62 local room = get_room_from_jid(room_jid); |
63 if not room then | |
64 session.send(st.error_reply(stanza, "cancel", "item-not-found")) | |
65 return true; | |
66 end | |
63 | 67 |
64 local from = stanza.attr.from; | 68 local from = stanza.attr.from; |
65 local from_affiliation = room:get_affiliation(from); | 69 local from_affiliation = room:get_affiliation(from); |
66 | 70 |
67 if stanza.attr.type == "get" then | 71 if stanza.attr.type == "get" then |