Changeset

1599:8e006226e4c5

mod_smacks: Don't attach timestamps to 'iq' stanzas
author Kim Alvefur <zash@zash.se>
date Mon, 26 Jan 2015 15:54:18 +0100
parents 1598:043d08448d87
children 1600:1e90054c3ac5
files mod_smacks/mod_smacks.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_smacks/mod_smacks.lua	Mon Jan 26 15:44:36 2015 +0100
+++ b/mod_smacks/mod_smacks.lua	Mon Jan 26 15:54:18 2015 +0100
@@ -64,7 +64,7 @@
 		local cached_stanza = st.clone(stanza);
 		cached_stanza._cached = true;
 
-		if cached_stanza and cached_stanza:get_child("delay", xmlns_delay) == nil then
+		if cached_stanza and cached_stanza.name ~= "iq" and cached_stanza:get_child("delay", xmlns_delay) == nil then
 			cached_stanza = cached_stanza:tag("delay", { xmlns = xmlns_delay, from = session.host, stamp = datetime.datetime()});
 		end