[folks] Don't add a duplicate candidate individual if one matches by user and IID



commit 642b15a9e7662623d1af815595e127cda7dd991c
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Mon Jan 17 22:02:55 2011 +0000

    Don't add a duplicate candidate individual if one matches by user and IID
    
    If an individual matches a persona being aggregated both by them both being
    the user, and by IID match, don't list the individual as a candidate
    individual twice (which would cause their personas to appear twice in the
    final individual).

 folks/individual-aggregator.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 4a56707..a1d6e7c 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -324,7 +324,8 @@ public class Folks.IndividualAggregator : Object
             {
               var candidate_ind = this._link_map.lookup (persona.iid);
               if (candidate_ind != null &&
-                  candidate_ind.trust_level != TrustLevel.NONE)
+                  candidate_ind.trust_level != TrustLevel.NONE &&
+                  !candidate_ind_set.contains (candidate_ind))
                 {
                   debug ("    Found candidate individual '%s' by IID '%s'.",
                       candidate_ind.id, persona.iid);



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