Software /
code /
prosody-modules
Diff
mod_smacks/mod_smacks.lua @ 2417:5e7badecf7fe
mod_smacks: Check if a session is an authenticated c2s session by looking for a username (fix for change in 0.10 9f70d35a1602)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 15 Dec 2016 02:57:03 +0100 |
parent | 2394:4c27ebcf4cbd |
child | 2491:5fbca7de2088 |
line wrap: on
line diff
--- a/mod_smacks/mod_smacks.lua Tue Dec 13 22:08:02 2016 +0100 +++ b/mod_smacks/mod_smacks.lua Thu Dec 15 02:57:03 2016 +0100 @@ -53,7 +53,7 @@ if session.smacks then return false, "unexpected-request", "Stream management is already enabled"; end local session_type = session.type; - if session_type == "c2s" then + if session.username then if not(advertise_only) and not(session.resource) then -- Fail unless we're only advertising sm return false, "unexpected-request", "Client must bind a resource before enabling stream management"; end