Update NotificationService, fix account attribute

pull/3635/head
Daniel Supernault 3 years ago
parent 533f7165a9
commit 949b7bb6ea
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

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

Loading…
Cancel
Save