<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\BaseModule;
use Friendica\Core\Logger;
use Friendica\Core\System;
+use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Conversation;
use Friendica\Model\User;
*/
class Notify extends BaseModule
{
- public static function post(array $parameters = [])
+ protected function post(array $request = [])
{
$postdata = Network::postdata();
}
$data = json_decode($postdata);
- if (is_object($data) && !empty($parameters['nickname'])) {
- $user = User::getByNickname($parameters['nickname']);
+ if (is_object($data) && !empty($this->parameters['nickname'])) {
+ $user = User::getByNickname($this->parameters['nickname']);
if (empty($user)) {
throw new \Friendica\Network\HTTPException\InternalServerErrorException();
}
self::dispatchPrivate($user, $postdata);
} elseif (!self::dispatchPublic($postdata)) {
require_once 'mod/salmon.php';
- salmon_post($a, $postdata);
+ salmon_post(DI::app(), $postdata);
}
}