1 local verse = require "verse"; |
1 local verse = require "verse"; |
2 |
2 |
3 local xmlns_session = "urn:ietf:params:xml:ns:xmpp-session"; |
3 local xmlns_session = "urn:ietf:params:xml:ns:xmpp-session"; |
4 |
4 |
5 function verse.plugins.session(stream) |
5 function verse.plugins.session(stream) |
6 |
6 |
7 local function handle_features(features) |
7 local function handle_features(features) |
8 local session_feature = features:get_child("session", xmlns_session); |
8 local session_feature = features:get_child("session", xmlns_session); |
9 if session_feature and not session_feature:get_child("optional") then |
9 if session_feature and not session_feature:get_child("optional") then |
10 local function handle_binding(jid) |
10 local function handle_binding(jid) |
11 stream:debug("Establishing Session..."); |
11 stream:debug("Establishing Session..."); |