Software /
code /
prosody-modules
Changeset
2737:f43c77c69a8a
mod_csi_battery_saver: Clone stanza pushed to queue
author | Michel Le Bihan <michel@lebihan.pl> |
---|---|
date | Tue, 15 Aug 2017 21:14:55 +0200 |
parents | 2736:fff185e7ab73 |
children | 2738:46b29a377bdf 2741:69248dcd7cff |
files | mod_csi_battery_saver/mod_csi_battery_saver.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);