aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/sessionmanager.lua5
-rw-r--r--plugins/mod_saslauth.lua2
2 files changed, 5 insertions, 2 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index c8856634..75e54b4f 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -108,7 +108,7 @@ local function make_authenticated(session, username)
if not username or #username == 0 then return nil, "Invalid username"; end
session.username = username;
if session.type == "c2s_unauthed" then
- session.type = "c2s";
+ session.type = "c2s_unbound";
end
session.log("info", "Authenticated as %s@%s", username or "(unknown)", session.host or "(unknown)");
return true;
@@ -176,6 +176,9 @@ local function bind_resource(session, resource)
session.full_jid = session.username .. '@' .. session.host .. '/' .. resource;
hosts[session.host].sessions[session.username].sessions[resource] = session;
full_sessions[session.full_jid] = session;
+ if session.type == "c2s_unbound" then
+ session.type = "c2s";
+ end
local err;
session.roster, err = rm_load_roster(session.username, session.host);
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index bb36600b..9917c303 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -273,7 +273,7 @@ module:hook("s2s-stream-features", function(event)
end
end);
-module:hook("iq/self/urn:ietf:params:xml:ns:xmpp-bind:bind", function(event)
+module:hook("stanza/iq/urn:ietf:params:xml:ns:xmpp-bind:bind", function(event)
local origin, stanza = event.origin, event.stanza;
local resource;
if stanza.attr.type == "set" then