Software /
code /
prosody
Diff
core/sessionmanager.lua @ 357:17bcecb06420
Use a stanza for c2s stream features instead of an array of strings. Removes a FIXME.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 20 Nov 2008 01:33:25 +0000 |
parent | 356:8ff322b550a3 |
child | 429:b1d86f89fa27 |
line wrap: on
line diff
--- a/core/sessionmanager.lua Thu Nov 20 01:32:24 2008 +0000 +++ b/core/sessionmanager.lua Thu Nov 20 01:33:25 2008 +0000 @@ -121,18 +121,12 @@ end - local features = {}; + local features = st.stanza("stream:features"); modulemanager.fire_event("stream-features", session, features); - -- FIXME: Need to send() this all at once - send("<stream:features>"); + send(features); - for _, feature in ipairs(features) do - send(tostring(feature)); - end - - send("</stream:features>"); - log("info", "Stream opened successfully"); + (session.log or log)("info", "Sent reply <stream:stream> to client"); session.notopen = nil; end