From 949b7bb6ea8fc4ee411bc8bfda9fd150071f1af1 Mon Sep 17 00:00:00 2001 From: Daniel Supernault <877217+dansup@users.noreply.github.com> Date: Mon, 29 Aug 2022 20:06:59 -0600 Subject: [PATCH] Update NotificationService, fix account attribute --- app/Services/NotificationService.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Services/NotificationService.php b/app/Services/NotificationService.php index 264f9df3..139b13a6 100644 --- a/app/Services/NotificationService.php +++ b/app/Services/NotificationService.php @@ -107,7 +107,9 @@ class NotificationService { foreach($ids as $id) { $n = self::rewriteMastodonTypes(self::getNotification($id)); if($n != null && in_array($n['type'], self::MASTODON_TYPES)) { - $n['account'] = AccountService::getMastodon($n['account']['id']); + if(isset($n['account'])) { + $n['account'] = AccountService::getMastodon($n['account']['id']); + } if(isset($n['relationship'])) { unset($n['relationship']); @@ -135,7 +137,9 @@ class NotificationService { foreach($ids as $id) { $n = self::rewriteMastodonTypes(self::getNotification($id)); if($n != null && in_array($n['type'], self::MASTODON_TYPES)) { - $n['account'] = AccountService::getMastodon($n['account']['id']); + if(isset($n['account'])) { + $n['account'] = AccountService::getMastodon($n['account']['id']); + } if(isset($n['relationship'])) { unset($n['relationship']);