mirror of https://gitlab.com/litecord/litecord.git
relationships: use intersection op instead of union op
This commit is contained in:
parent
fb21ea528e
commit
e5c75011da
|
|
@ -264,7 +264,7 @@ async def get_mutual_friends(peer_id: int):
|
||||||
for rel in peer_rels if rel['type'] == _friend}
|
for rel in peer_rels if rel['type'] == _friend}
|
||||||
|
|
||||||
# get the intersection, then map them to Storage.get_user() calls
|
# 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 = []
|
mutual_friends = []
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue