Validate attributedTo in the case it is an object

This commit is contained in:
Kitaiti Makoto
2020-12-11 00:35:20 +09:00
parent de05b9e176
commit 2eadb80435
2 changed files with 138 additions and 2 deletions
+2 -2
View File
@@ -242,11 +242,11 @@ where
match attributed_to {
Array(v) => v.iter().all(|i| match i {
String(s) => s != actor_id,
Object(_) => false, // TODO: Validate recursively"
Object(obj) => obj.get("id").map_or(true, |s| s != actor_id),
_ => false,
}),
String(s) => s != actor_id,
Object(_) => false, // TODO: Validate Recursively
Object(obj) => obj.get("id").map_or(true, |s| s != actor_id),
_ => false,
}
}