Comparison

core/sessionmanager.lua @ 332:51e130b5c8de

Remove useless check for unavailable presence (which never exists)
author Matthew Wild <mwild1@gmail.com>
date Tue, 18 Nov 2008 19:40:04 +0000
parent 331:830fd67f9378
child 333:8d15b073fdbe
comparison
equal deleted inserted replaced
331:830fd67f9378 332:51e130b5c8de
35 35
36 function destroy_session(session) 36 function destroy_session(session)
37 (session.log or log)("info", "Destroying session"); 37 (session.log or log)("info", "Destroying session");
38 38
39 -- Send unavailable presence 39 -- Send unavailable presence
40 if session.presence and session.presence.attr.type ~= "unavailable" then 40 if session.presence then
41 local pres = st.presence{ type = "unavailable" }; 41 local pres = st.presence{ type = "unavailable" };
42 if err == "closed" then err = "connection closed"; end 42 if err == "closed" then err = "connection closed"; end
43 pres:tag("status"):text("Disconnected: "..err); 43 pres:tag("status"):text("Disconnected: "..err);
44 session.stanza_dispatch(pres); 44 session.stanza_dispatch(pres);
45 end 45 end