# HG changeset patch # User Kim Alvefur # Date 1577138504 -3600 # Node ID 20346da6d24152ebd3fd20d2d0b35da3a6577ce3 # Parent 915c7bd5f7549c1dbc51262d8ace3051a0fa8f72 mod_turncredentials: Fix reporting of expiry in extdisco:2 protocol Hm, this didn't look right: diff -r 915c7bd5f754 -r 20346da6d241 mod_turncredentials/mod_turncredentials.lua --- a/mod_turncredentials/mod_turncredentials.lua Mon Dec 23 23:01:19 2019 +0100 +++ b/mod_turncredentials/mod_turncredentials.lua Mon Dec 23 23:01:44 2019 +0100 @@ -45,7 +45,7 @@ local nonce = base64.encode(hmac_sha1(secret, tostring(userpart), false)); origin.send(st.reply(stanza):tag("services", {xmlns = "urn:xmpp:extdisco:2"}) :tag("service", { type = "stun", host = host, port = ("%d"):format(port) }):up() - :tag("service", { type = "turn", host = host, port = ("%d"):format(port), username = userpart, password = nonce, expires = datetime(ttl), restricted = "1" }):up() + :tag("service", { type = "turn", host = host, port = ("%d"):format(port), username = userpart, password = nonce, expires = datetime(expires_at), restricted = "1" }):up() ); return true; end);