Update NotificationService, fix account attribute

This commit is contained in:
Daniel Supernault 2022-08-29 20:06:59 -06:00
parent 533f7165a9
commit 949b7bb6ea
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 6 additions and 2 deletions

View File

@ -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']);