From 631bfd83e901ff41d38798669be928d4a55bf9d8 Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Fri, 5 May 2023 18:08:51 +0200 Subject: [PATCH] use new style of accessing baseUrl --- mailstream/mailstream.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index 1392d0d1..f53d4fe9 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -102,7 +102,7 @@ function mailstream_addon_admin_post() */ function mailstream_generate_id(string $uri): string { - $host = DI::baseUrl()->getHostname(); + $host = DI::baseUrl()->getHost(); $resource = hash('md5', $uri); $message_id = "<" . $resource . "@" . $host . ">"; Logger::debug('mailstream: Generated message ID ' . $message_id . ' for URI ' . $uri); @@ -412,7 +412,7 @@ function mailstream_send(string $message_id, array $item, array $user): bool $template = Renderer::getMarkupTemplate('mail.tpl', 'addon/mailstream/'); $mail->AltBody = BBCode::toPlaintext($item['body']); $item['body'] = BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::CONNECTORS); - $item['url'] = DI::baseUrl()->get() . '/display/' . $item['guid']; + $item['url'] = DI::baseUrl() . '/display/' . $item['guid']; $mail->Body = Renderer::replaceMacros($template, [ '$upstream' => DI::l10n()->t('Upstream'), '$uri' => DI::l10n()->t('URI'), -- 2.39.5