Mercurial > prosody-modules
comparison mod_csi_battery_saver/mod_csi_battery_saver.lua @ 2757:595d9d68fd11
mod_csi_battery_saver: Fix #921
See also https://mail.jabber.org/pipermail/standards/2017-May/032773.html
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Sun, 27 Aug 2017 21:35:08 +0200 |
parents | d1aa5fc005f7 |
children | dfac28504e86 |
comparison
equal
deleted
inserted
replaced
2756:dbba101601b4 | 2757:595d9d68fd11 |
---|---|
91 end | 91 end |
92 return false; | 92 return false; |
93 end | 93 end |
94 | 94 |
95 local function add_stamp(stanza, session) | 95 local function add_stamp(stanza, session) |
96 stanza = stanza:tag("delay", { xmlns = xmlns_delay, from = session.host, stamp = datetime.datetime()}); | 96 local bare_jid = jid.bare(session.full_jid or session.host); |
97 stanza = stanza:tag("delay", { xmlns = xmlns_delay, from = bare_jid, stamp = datetime.datetime()}); | |
97 return stanza; | 98 return stanza; |
98 end | 99 end |
99 | 100 |
100 local function is_important(stanza, session) | 101 local function is_important(stanza, session) |
101 local st_name = stanza and stanza.name or nil; | 102 local st_name = stanza and stanza.name or nil; |