mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:42:53 +00:00
Merge branch 'friendica:develop' into nginx_template_improvements
This commit is contained in:
commit
960477cfaa
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue