Created
November 24, 2015 14:10
-
-
Save tony2001/84afe65703926a0c8264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/storage.go b/storage.go | |
index 63c7c7c..eebf02d 100644 | |
--- a/storage.go | |
+++ b/storage.go | |
@@ -270,8 +270,14 @@ func (s *Storage) LoadLinks(bucket uint32, link_id uint64, load_limit uint32) ([ | |
for row := res.MakeRow(); ; { | |
err = res.ScanRow(row) | |
if err == nil { | |
+ contact_link_id := row.ForceUint64(0) | |
+ if contact_link_id == link_id { | |
+ // ignore user in his own contacts | |
+ continue | |
+ } | |
+ | |
links = append(links, trustd_loader.UnregUserLink{ | |
- UinLinkId: row.ForceUint64(0), | |
+ UinLinkId: contact_link_id, | |
BadooUid: uint32(row.ForceUint64(1)), | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment