equal
deleted
inserted
replaced
215 |
215 |
216 module:hook_stanza(xmlns_sm, "resume", function (session, stanza) |
216 module:hook_stanza(xmlns_sm, "resume", function (session, stanza) |
217 local id = stanza.attr.previd; |
217 local id = stanza.attr.previd; |
218 local original_session = session_registry[id]; |
218 local original_session = session_registry[id]; |
219 if not original_session then |
219 if not original_session then |
|
220 session.log("debug", "Tried to resume non-existent session with id %s", id); |
220 session.send(st.stanza("failed", sm_attr) |
221 session.send(st.stanza("failed", sm_attr) |
221 :tag("item-not-found", { xmlns = xmlns_errors }) |
222 :tag("item-not-found", { xmlns = xmlns_errors }) |
222 ); |
223 ); |
223 elseif session.username == original_session.username |
224 elseif session.username == original_session.username |
224 and session.host == original_session.host then |
225 and session.host == original_session.host then |