}
$replyto = JsonLD::fetchElement($activity['as:object'], 'as:inReplyTo', '@id');
- $uriid = ItemURI::getIdByURI($replyto);
+ $uriid = ItemURI::getIdByURI($replyto ?? '');
if (Post::exists(['uri-id' => $uriid])) {
Logger::info('Post is a reply to an existing post - accepted', ['id' => $id, 'uri-id' => $uriid, 'replyto' => $replyto]);
return true;
* perform a "follow" request
*
* @param array $activity
+ * @return void
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
Contact::update(['hub-verify' => $activity['id'], 'protocol' => Protocol::ACTIVITYPUB], ['id' => $cid]);
}
- $item = ['author-id' => Contact::getIdForURL($activity['actor']),
- 'author-link' => $activity['actor']];
+ $item = [
+ 'author-id' => Contact::getIdForURL($activity['actor']),
+ 'author-link' => $activity['actor'],
+ ];
// Ensure that the contact has got the right network type
self::switchContact($item['author-id']);
/**
* Transmit pending events to the new follower
*
- * @param integer $cid
- * @param integer $uid
+ * @param integer $cid Contact id
+ * @param integer $uid User id
* @return void
*/
private static function transmitPendingEvents(int $cid, int $uid)
* Delete the given profile
*
* @param array $activity
+ * @return void
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
public static function deletePerson(array $activity)
* Blocks the user by the contact
*
* @param array $activity
+ * @return void
* @throws \Exception
*/
public static function blockAccount(array $activity)
* Unblocks the user by the contact
*
* @param array $activity
+ * @return void
* @throws \Exception
*/
public static function unblockAccount(array $activity)