Fixes mutual connections not being seen and hence requests failing.

This commit is contained in:
Paul
2021-03-30 22:09:36 +01:00
parent 0a9d5de369
commit 37df18dbf7
4 changed files with 11 additions and 11 deletions

View File

@@ -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,
)

View File

@@ -9,7 +9,7 @@ use rocket_contrib::json::JsonValue;
#[get("/")]
pub async fn root() -> JsonValue {
json!({
"revolt": "0.3.3-alpha.7-patch.0",
"revolt": "0.3.3-alpha.8",
"features": {
"registration": !*DISABLE_REGISTRATION,
"captcha": {