From 49459821becb6d8db938fe7df625e158926dfff8 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 1 Jun 2021 14:23:12 +0000 Subject: [PATCH] Renamed function --- src/Factory/Api/Mastodon/Notification.php | 2 +- src/Model/Post/UserNotification.php | 2 +- src/Module/Api/Mastodon/Notifications.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Factory/Api/Mastodon/Notification.php b/src/Factory/Api/Mastodon/Notification.php index 58c1fee9de..11c0aee3aa 100644 --- a/src/Factory/Api/Mastodon/Notification.php +++ b/src/Factory/Api/Mastodon/Notification.php @@ -30,7 +30,7 @@ use Friendica\Protocol\Activity; class Notification extends BaseFactory { - public function createFromNotifyId(int $id) + public function createFromNotificationId(int $id) { $notification = DBA::selectFirst('notification', [], ['id' => $id]); if (!DBA::isResult($notification)) { diff --git a/src/Model/Post/UserNotification.php b/src/Model/Post/UserNotification.php index 306584bbd6..38c2bdd8e8 100644 --- a/src/Model/Post/UserNotification.php +++ b/src/Model/Post/UserNotification.php @@ -289,7 +289,7 @@ class UserNotification $fields['target-uri-id'] = $item['uri-id']; } - dba::insert('notification', $fields); + DBA::insert('notification', $fields); } /** diff --git a/src/Module/Api/Mastodon/Notifications.php b/src/Module/Api/Mastodon/Notifications.php index 4a25224d88..6a2a099593 100644 --- a/src/Module/Api/Mastodon/Notifications.php +++ b/src/Module/Api/Mastodon/Notifications.php @@ -46,10 +46,10 @@ class Notifications extends BaseApi if (!empty($parameters['id'])) { $id = $parameters['id']; - if (!DBA::exists('notify', ['id' => $id, 'uid' => $uid])) { + if (!DBA::exists('notification', ['id' => $id, 'uid' => $uid])) { DI::mstdnError()->RecordNotFound(); } - System::jsonExit(DI::mstdnNotification()->createFromNotifyId($id)); + System::jsonExit(DI::mstdnNotification()->createFromNotificationId($id)); } $request = self::getRequest([ @@ -120,7 +120,7 @@ class Notifications extends BaseApi $notify = DBA::select('notification', ['id'], $condition, $params); while ($notification = DBA::fetch($notify)) { - $entry = DI::mstdnNotification()->createFromNotifyId($notification['id']); + $entry = DI::mstdnNotification()->createFromNotificationId($notification['id']); if (!empty($entry)) { $notifications[] = $entry; } -- 2.39.5