Software /
code /
prosody
Diff
plugins/mod_lastactivity.lua @ 11120:b2331f3dfeea
Merge 0.11->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 30 Sep 2020 09:50:33 +0100 |
parent | 10750:ff087f2d4cb6 |
child | 12977:74b9e05af71e |
line wrap: on
line diff
--- a/plugins/mod_lastactivity.lua Thu Oct 01 15:08:58 2020 +0100 +++ b/plugins/mod_lastactivity.lua Wed Sep 30 09:50:33 2020 +0100 @@ -30,7 +30,7 @@ if not stanza.attr.to or is_contact_subscribed(username, module.host, jid_bare(stanza.attr.from)) then local seconds, text = "0", ""; if map[username] then - seconds = tostring(os.difftime(os.time(), map[username].t)); + seconds = string.format("%d", os.difftime(os.time(), map[username].t)); text = map[username].s; end origin.send(st.reply(stanza):tag('query', {xmlns='jabber:iq:last', seconds=seconds}):text(text));