Update NotificationService, fix account attribute

pull/3635/head
Daniel Supernault 2022-08-29 20:06:59 -06:00
rodzic 533f7165a9
commit 949b7bb6ea
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

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