Skip to content

Instantly share code, notes, and snippets.

@tony2001
Created November 24, 2015 14:10
Show Gist options
  • Save tony2001/84afe65703926a0c8264 to your computer and use it in GitHub Desktop.
Save tony2001/84afe65703926a0c8264 to your computer and use it in GitHub Desktop.
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