aboutsummaryrefslogtreecommitdiffstats
path: root/core/sessionmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-20 01:33:25 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-20 01:33:25 +0000
commit5c7ec634b1765f8edcc8b59aff2b2b899180dc65 (patch)
tree07dbd8f7cafdc380476d8e6dd0bc478775809800 /core/sessionmanager.lua
parent6a333d94d6779850451ca74249906ebf53c5f369 (diff)
downloadprosody-5c7ec634b1765f8edcc8b59aff2b2b899180dc65.tar.gz
prosody-5c7ec634b1765f8edcc8b59aff2b2b899180dc65.zip
Use a stanza for c2s stream features instead of an array of strings. Removes a FIXME.
Diffstat (limited to 'core/sessionmanager.lua')
-rw-r--r--core/sessionmanager.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index 8be7bdec..e83b7c23 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -121,18 +121,12 @@ function streamopened(session, attr)
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