Diff

plugins/mod_lastactivity.lua @ 10758:d0e6d5bc7ea2

Merge with upstream trunk
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Apr 2020 13:53:18 +0100
parent 10750:ff087f2d4cb6
child 12977:74b9e05af71e
line wrap: on
line diff
--- a/plugins/mod_lastactivity.lua	Thu Apr 23 13:52:19 2020 +0100
+++ b/plugins/mod_lastactivity.lua	Thu Apr 23 13:53:18 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));