mirror of
https://github.com/friendica/friendica
synced 2024-11-09 17:02:54 +00:00
Return early if user contact doesn't exist in Mastodon\Notification::getType
- Address https://github.com/friendica/friendica/issues/11993#issuecomment-1321804594
This commit is contained in:
parent
c356c962f1
commit
8e67d28997
1 changed files with 5 additions and 0 deletions
|
@ -87,6 +87,11 @@ class Notification extends BaseFactory
|
|||
if (($contact['uid'] == 0) && !empty($contact['uri-id'])) {
|
||||
$contact = Contact::selectFirst(['pending'], ['uri-id' => $contact['uri-id'], 'uid' => $Notification->uid]);
|
||||
}
|
||||
|
||||
if (!isset($contact['pending'])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$type = $contact['pending'] ? MstdnNotification::TYPE_INTRODUCTION : MstdnNotification::TYPE_FOLLOW;
|
||||
} elseif (($Notification->verb == Activity::ANNOUNCE) &&
|
||||
in_array($Notification->type, [Post\UserNotification::TYPE_DIRECT_COMMENT, Post\UserNotification::TYPE_DIRECT_THREAD_COMMENT])) {
|
||||
|
|
Loading…
Reference in a new issue