Discard presence of type error/unavailable

Sat, 18 Sep 2010 18:57:41 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 18 Sep 2010 18:57:41 +0100
changeset 4
9a4a18d11166
parent 3
6d73aab94365
child 5
db500386b9c4

Discard presence of type error/unavailable

capscan.lua file | annotate | diff | comparison | revisions
--- a/capscan.lua	Sat Sep 18 18:36:34 2010 +0100
+++ b/capscan.lua	Sat Sep 18 18:57:41 2010 +0100
@@ -33,7 +33,7 @@
 
 conn:hook("ready", function ()
 	conn:hook("presence", function (presence)
-		if contacts[presence.attr.from] then return; end;
+		if contacts[presence.attr.from] or presence.attr.type then return; end;
 		
 		local contact = { jid = presence.attr.from };
 		contacts[contact.jid] = contact;

mercurial