# HG changeset patch # User Michel Le Bihan # Date 1502824495 -7200 # Node ID f43c77c69a8a54b410a69133c0f3ccfa9746f2d9 # Parent fff185e7ab7378f6648a8883904bf10ab00fab3f mod_csi_battery_saver: Clone stanza pushed to queue diff -r fff185e7ab73 -r f43c77c69a8a mod_csi_battery_saver/mod_csi_battery_saver.lua --- a/mod_csi_battery_saver/mod_csi_battery_saver.lua Mon Aug 14 23:31:05 2017 +0200 +++ b/mod_csi_battery_saver/mod_csi_battery_saver.lua Tue Aug 15 21:14:55 2017 +0200 @@ -9,6 +9,7 @@ local jid = require "util.jid"; local new_queue = require "util.queue".new; local datetime = require "util.datetime"; +local clone = require "util.stanza".clone; local xmlns_delay = "urn:xmpp:delay"; @@ -56,7 +57,7 @@ end local push = q.push; function q:push(item) - local ok = push(self, item); + local ok = push(self, clone(item)); if not ok then q:flush(); output(item, self);