Merge remote-tracking branch 'origin/nginx_template_improvements' into nginx_template_improvements

This commit is contained in:
Marek Bachmann 2022-11-24 23:08:07 +01:00
commit bd7582e841
2 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
## ##
# Friendica Nginx configuration template to be autocnfgiured with cerbot # Friendica Nginx configuration template to be autoconfigured with certbot
# nased on sample-nginx.config by Olaf Conradi # based on sample-nginx.config by Olaf Conradi
# #
# On Debian based distributions you can add this file to # On Debian based distributions you can add this file to
# /etc/nginx/sites-available # /etc/nginx/sites-available

View File

@ -182,7 +182,8 @@ class Protocol
public static function unfollow(array $contact, array $user): ?bool public static function unfollow(array $contact, array $user): ?bool
{ {
if (empty($contact['network'])) { if (empty($contact['network'])) {
throw new \InvalidArgumentException('Missing network key in contact array'); Logger::notice('Contact has got no network, we quit here', ['id' => $contact['id']]);
return null;
} }
$protocol = $contact['network']; $protocol = $contact['network'];
@ -205,7 +206,8 @@ class Protocol
$slap = OStatus::salmon($item, $user); $slap = OStatus::salmon($item, $user);
if (empty($contact['notify'])) { if (empty($contact['notify'])) {
throw new \InvalidArgumentException('Missing expected "notify" key in OStatus/DFRN contact'); Logger::notice('OStatus/DFRN Contact is missing notify, we quit here', ['id' => $contact['id']]);
return null;
} }
return Salmon::slapper($user, $contact['notify'], $slap) === 0; return Salmon::slapper($user, $contact['notify'], $slap) === 0;