Don't accept ignored author via relay

This commit is contained in:
Michael 2020-10-02 03:35:22 +00:00
parent 9cd9ad647d
commit 9b1918c650
4 changed files with 19 additions and 4 deletions

View file

@ -806,6 +806,9 @@ class Processor
return true;
}
$attributed_to = JsonLD::fetchElement($activity['as:object'], 'as:attributedTo', '@id');
$authorid = Contact::getIdForURL($attributed_to);
$body = HTML::toBBCode(JsonLD::fetchElement($activity['as:object'], 'as:content', '@value'));
$messageTags = [];
@ -819,7 +822,7 @@ class Processor
}
}
return Relay::isSolicitedPost($messageTags, $body, $id, Protocol::ACTIVITYPUB);
return Relay::isSolicitedPost($messageTags, $body, $authorid, $id, Protocol::ACTIVITYPUB);
}
/**