Mercurial > prosody-modules
changeset 3774:20346da6d241
mod_turncredentials: Fix reporting of expiry in extdisco:2 protocol
Hm, this didn't look right:
<service expires='1970-01-02T00:00:00Z' ..>
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 23 Dec 2019 23:01:44 +0100 |
parents | 915c7bd5f754 |
children | d60efdb947fd |
files | mod_turncredentials/mod_turncredentials.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);