# HG changeset patch # User Emmanuel Gil Peyrot # Date 1460807280 -3600 # Node ID 4b58e35a72e0c4bdd576e8b72a4ff230d317c7b5 # Parent 95a9f2d234da0d9585a649f5df78ec8ca0881468 mod_idlecompat: Reference the correct XEP (256, not 12) and drop a redundant check diff -r 95a9f2d234da -r 4b58e35a72e0 mod_idlecompat/mod_idlecompat.lua --- a/mod_idlecompat/mod_idlecompat.lua Fri Apr 15 16:59:27 2016 +0000 +++ b/mod_idlecompat/mod_idlecompat.lua Sat Apr 16 12:48:00 2016 +0100 @@ -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);