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

This commit is contained in:
Matthew Wild 2009-07-27 01:27:51 +01:00
parent 23a10d0390
commit a0b8648d1f

View file

@ -330,7 +330,7 @@ module:hook("resource-unbind", function(event)
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