use Friendica\App\BaseURL;
use Friendica\Content\Text\BBCode;
-use Friendica\Core\Config\IConfig;
+use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\L10n;
+use Friendica\Model\User;
use Friendica\Object\Email;
/**
*/
class NotifyAllEmail extends Email
{
- public function __construct(L10n $l10n, IConfig $config, BaseURL $baseUrl, string $text)
+ public function __construct(L10n $l10n, IManageConfigValues $config, BaseURL $baseUrl, string $text)
{
$sitename = $config->get('config', 'sitename');
}
if (!$config->get('config', 'sender_email')) {
- $sender_email = 'noreply@' . $baseUrl->getHostname();
+ $sender_email = 'noreply@' . $baseUrl->getHost();
} else {
$sender_email = $config->get('config', 'sender_email');
}
$subject = $_REQUEST['subject'];
- $textversion = strip_tags(html_entity_decode(BBCode::convert(stripslashes(str_replace(["\\r", "\\n"], ["", "\n"], $text))), ENT_QUOTES, 'UTF-8'));
+ $textversion = strip_tags(html_entity_decode(BBCode::convertForUriId(User::getSystemUriId(), stripslashes(str_replace(["\\r", "\\n"], ["", "\n"], $text))), ENT_QUOTES, 'UTF-8'));
- $htmlversion = BBCode::convert(stripslashes(str_replace(["\\r", "\\n"], ["", "<br />\n"], $text)));
+ $htmlversion = BBCode::convertForUriId(User::getSystemUriId(), stripslashes(str_replace(["\\r", "\\n"], ["", "<br />\n"], $text)));
parent::__construct($sender_name, $sender_email, $sender_email, '', $subject, $htmlversion, $textversion);
}