Comparison

plugins/adhoc/adhoc.lib.lua @ 3229:0abb73c43bc8

mod_adhoc/adhoc.lib: Handle errors according to XEP
author Matthew Wild <mwild1@gmail.com>
date Fri, 11 Jun 2010 12:17:57 +0100
parent 3220:b3772f9bc359
child 3230:a5c3a82d677e
comparison
equal deleted inserted replaced
3228:65e5dfcf5a9f 3229:0abb73c43bc8
36 states[sessionid] = nil; 36 states[sessionid] = nil;
37 cmdtag = command:cmdtag("canceled", sessionid); 37 cmdtag = command:cmdtag("canceled", sessionid);
38 elseif data.status == "error" then 38 elseif data.status == "error" then
39 states[sessionid] = nil; 39 states[sessionid] = nil;
40 stanza = st.error_reply(stanza, data.error.type, data.error.condition, data.error.message); 40 stanza = st.error_reply(stanza, data.error.type, data.error.condition, data.error.message);
41 cmdtag = command:cmdtag("canceled", sessionid); 41 origin.send(stanza);
42 return true;
42 else 43 else
43 cmdtag = command:cmdtag("executing", sessionid); 44 cmdtag = command:cmdtag("executing", sessionid);
44 end 45 end
45 46
46 for name, content in pairs(data) do 47 for name, content in pairs(data) do