relationships: use intersection op instead of union op

This commit is contained in:
Luna 2018-12-06 01:57:34 -03:00
parent fb21ea528e
commit e5c75011da
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ async def get_mutual_friends(peer_id: int):
for rel in peer_rels if rel['type'] == _friend}
# get the intersection, then map them to Storage.get_user() calls
mutual_ids = user_friends | peer_friends
mutual_ids = user_friends & peer_friends
mutual_friends = []