Changeset

1171:a18effacd384

mod_turncredentials: No need to check tag name, we're already in the event handler for the 'services' tag
author Matthew Wild <mwild1@gmail.com>
date Wed, 28 Aug 2013 10:37:23 +0100
parents 1170:6695c3098025
children 1172:1e8b793d8ff9
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	Wed Aug 28 10:35:56 2013 +0100
+++ b/mod_turncredentials/mod_turncredentials.lua	Wed Aug 28 10:37:23 2013 +0100
@@ -17,7 +17,7 @@
 
 module:hook("iq-get/host/urn:xmpp:extdisco:1:services", function(event)
     local origin, stanza = event.origin, event.stanza;
-    if stanza.tags[1].name ~= "services" or origin.type ~= "c2s" then
+    if origin.type ~= "c2s" then
         return;
     end
     local now = os_time() + ttl;