mod_turncredentials: Fix reporting of expiry in extdisco:2 protocol
Hm, this didn't look right:
<service expires='1970-01-02T00:00:00Z' ..>
--- 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);