[gnome-contacts] Filter out link local xmpp contacts



commit 0de1ae2c5d31df7b7137539d0e42ded9e48dd2e4
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Jun 16 17:29:36 2011 +0200

    Filter out link local xmpp contacts

 src/contacts-store.vala |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/contacts-store.vala b/src/contacts-store.vala
index 4a933bd..2f0fb6c 100644
--- a/src/contacts-store.vala
+++ b/src/contacts-store.vala
@@ -52,14 +52,21 @@ public class Contacts.Store  {
 		if (contact.individual.is_user)
 		  return false;
 
-		// Filter out pure key-file persona individuals as these are
-		// not very interesting
 		var personas = contact.individual.personas;
 		var i = personas.iterator();
-		if (i.next()) {
+		// Look for single-persona individuals
+		if (i.next() && !i.has_next ()) {
 		  var persona = i.get();
-		  if (!i.has_next () &&
-		      persona.store.type_id == "key-file")
+		  var store = persona.store;
+
+		  // Filter out pure key-file persona individuals as these are
+		  // not very interesting
+		  if (store.type_id == "key-file")
+		    return false;
+
+		  // Filter out uncertain things like link-local xmpp
+		  if (store.type_id == "telepathy" &&
+		      store.trust_level == PersonaStoreTrust.NONE)
 		    return false;
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]