# HG changeset patch # User Kim Alvefur # Date 1460922108 -7200 # Node ID e0b8b8a50013a04ba0f6f4df6ce244b3b12b92d6 # Parent 88fec2b2bd583b77ef540d012ac202cef8035daa# Parent 4b58e35a72e0c4bdd576e8b72a4ff230d317c7b5 Merge with Link Mauve diff -r 88fec2b2bd58 -r e0b8b8a50013 mod_idlecompat/mod_idlecompat.lua --- a/mod_idlecompat/mod_idlecompat.lua Sat Apr 16 20:21:13 2016 +0200 +++ b/mod_idlecompat/mod_idlecompat.lua Sun Apr 17 21:41:48 2016 +0200 @@ -1,6 +1,6 @@ -- Last User Interaction in Presence via Last Activity compatibility module -- http://xmpp.org/extensions/xep-0319.html --- http://xmpp.org/extensions/xep-0012.html +-- http://xmpp.org/extensions/xep-0256.html -- Copyright (C) 2014 Tobias Markmann -- -- This file is MIT/X11 licensed. @@ -11,7 +11,7 @@ local function on_presence(event) local stanza = event.stanza; - local last_activity = stanza.name == "presence" and stanza:get_child("query", "jabber:iq:last") or false; + local last_activity = stanza:get_child("query", "jabber:iq:last"); local has_idle = stanza:get_child("idle", "urn:xmpp:idle:1"); if last_activity and not has_idle then module:log("debug", "Adding XEP-0319 tag from Last Activity."); @@ -28,4 +28,4 @@ -- outgoing module:hook("pre-presence/bare", on_presence, 900); module:hook("pre-presence/full", on_presence, 900); -module:hook("pre-presence/host", on_presence, 900); \ No newline at end of file +module:hook("pre-presence/host", on_presence, 900);