mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
Fixes mutual connections not being seen and hence requests failing.
This commit is contained in:
@@ -68,14 +68,12 @@ impl<'a> PermissionCalculator<'a> {
|
||||
|| get_collection("channels")
|
||||
.find_one(
|
||||
doc! {
|
||||
"$or": [
|
||||
{ "type": "Group" },
|
||||
{ "type": "DirectMessage" },
|
||||
],
|
||||
"$and": [
|
||||
{ "recipients": &self.perspective.id },
|
||||
{ "recipients": target }
|
||||
]
|
||||
"channel_type": {
|
||||
"$in": ["Group", "DirectMessage"]
|
||||
},
|
||||
"recipients": {
|
||||
"$all": [ &self.perspective.id, target ]
|
||||
}
|
||||
},
|
||||
None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user