Bad parameter fixed
This commit is contained in:
parent
8e80fb3528
commit
c8f3f079cc
@ -139,8 +139,8 @@ class ActivityPubPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return Activitypub_notice::create_notice(
|
return Activitypub_notice::create_notice(
|
||||||
ActivityPub_explorer::get_profile_from_url($res->attributedTo),
|
ActivityPub_explorer::get_profile_from_url($res->attributedTo),
|
||||||
$res->id,
|
$res->id,
|
||||||
$res->url,
|
$res->url,
|
||||||
$res->content,
|
$res->content,
|
||||||
$res->cc,
|
$res->cc,
|
||||||
|
@ -201,11 +201,11 @@ class Activitypub_notice extends Managed_DataObject
|
|||||||
* Validates a remote notice.
|
* Validates a remote notice.
|
||||||
*
|
*
|
||||||
* @author Diogo Cordeiro <diogo@fc.up.pt>
|
* @author Diogo Cordeiro <diogo@fc.up.pt>
|
||||||
* @param Array $data
|
* @param StdClass $data
|
||||||
* @return boolean true in case of success
|
* @return boolean true in case of success
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function validate_remote_notice($data)
|
public static function validate_remote_notice(&$data)
|
||||||
{
|
{
|
||||||
if (!isset($data->attributedTo)) {
|
if (!isset($data->attributedTo)) {
|
||||||
common_debug('ActivityPub Notice Validator: Rejected because attributedTo was not specified.');
|
common_debug('ActivityPub Notice Validator: Rejected because attributedTo was not specified.');
|
||||||
|
Reference in New Issue
Block a user