mod_presence: Tag outgoing unavailables generated by a disconnect with a from attribute

Mon, 27 Jul 2009 01:27:51 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 27 Jul 2009 01:27:51 +0100
changeset 1606
bbadcaab0036
parent 1581
4cdf9cefa0bc
child 1607
d81f5bb1f6b8
child 1608
fb53fe17af36

mod_presence: Tag outgoing unavailables generated by a disconnect with a from attribute

plugins/mod_presence.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_presence.lua	Thu Jul 23 12:01:00 2009 +0100
+++ b/plugins/mod_presence.lua	Mon Jul 27 01:27:51 2009 +0100
@@ -330,7 +330,7 @@
 		pres:tag("status"):text("Disconnected: "..err):up();
 		session:dispatch_stanza(pres);
 	elseif session.directed then
-		local pres = st.presence{ type = "unavailable" };
+		local pres = st.presence{ type = "unavailable", from = session.full_jid };
 		if not(err) or err == "closed" then err = "connection closed"; end
 		pres:tag("status"):text("Disconnected: "..err):up();
 		for jid in pairs(session.directed) do

mercurial