235 local jingle_tag = stanza:get_child("jingle", xmlns_jingle); |
235 local jingle_tag = stanza:get_child("jingle", xmlns_jingle); |
236 return self:handle_command(jingle_tag) |
236 return self:handle_command(jingle_tag) |
237 end); |
237 end); |
238 |
238 |
239 self.stream:send_iq(session_initiate, function (result) |
239 self.stream:send_iq(session_initiate, function (result) |
240 if result.type == "error" then |
240 if result.attr.type == "error" then |
241 self.state = "terminated"; |
241 self.state = "terminated"; |
242 local type, condition, text = result:get_error(); |
242 local type, condition, text = result:get_error(); |
243 return self:event("error", { type = type, condition = condition, text = text }); |
243 return self:event("error", { type = type, condition = condition, text = text }); |
244 end |
244 end |
245 end); |
245 end); |