Changeset

2165:e0b8b8a50013

Merge with Link Mauve
author Kim Alvefur <zash@zash.se>
date Sun, 17 Apr 2016 21:41:48 +0200
parents 2163:88fec2b2bd58 (current diff) 2164:4b58e35a72e0 (diff)
children 2166:13f8ad3293c4
files
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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);