fix friends aggregation matcher

This commit is contained in:
Thibault Duplessis 2016-01-24 10:32:53 +07:00
parent e98f3674dd
commit f2be8e3702

View file

@ -41,7 +41,8 @@ final class RelationApi(
def fetchBlocking = RelationRepo blocking _
def fetchFriends(userId: ID) = coll.aggregate(Match(BSONDocument(
"$or" -> BSONArray(BSONDocument("u1" -> userId), BSONDocument("u2" -> userId))
"$or" -> BSONArray(BSONDocument("u1" -> userId), BSONDocument("u2" -> userId)),
"r" -> Follow
)), List(
Group(BSONNull)(
"u1" -> AddToSet("u1"),