Validate spoofing for all activities

This commit is contained in:
Kitaiti Makoto 2020-12-22 16:31:12 +09:00
parent 45b46838ae
commit d6a946f5b9

View File

@ -231,9 +231,6 @@ where
fn is_spoofed_activity(actor_id: &str, act: &serde_json::Value) -> bool { fn is_spoofed_activity(actor_id: &str, act: &serde_json::Value) -> bool {
use serde_json::Value::{Array, Object, String}; use serde_json::Value::{Array, Object, String};
if act["type"] != String("Create".to_string()) {
return false;
}
let attributed_to = act["object"].get("attributedTo"); let attributed_to = act["object"].get("attributedTo");
if attributed_to.is_none() { if attributed_to.is_none() {
return false; return false;