Renamed function

This commit is contained in:
Michael 2021-06-01 14:23:12 +00:00
parent 3f0937dd42
commit 49459821be
3 changed files with 5 additions and 5 deletions

View file

@ -30,7 +30,7 @@ use Friendica\Protocol\Activity;
class Notification extends BaseFactory class Notification extends BaseFactory
{ {
public function createFromNotifyId(int $id) public function createFromNotificationId(int $id)
{ {
$notification = DBA::selectFirst('notification', [], ['id' => $id]); $notification = DBA::selectFirst('notification', [], ['id' => $id]);
if (!DBA::isResult($notification)) { if (!DBA::isResult($notification)) {

View file

@ -289,7 +289,7 @@ class UserNotification
$fields['target-uri-id'] = $item['uri-id']; $fields['target-uri-id'] = $item['uri-id'];
} }
dba::insert('notification', $fields); DBA::insert('notification', $fields);
} }
/** /**

View file

@ -46,10 +46,10 @@ class Notifications extends BaseApi
if (!empty($parameters['id'])) { if (!empty($parameters['id'])) {
$id = $parameters['id']; $id = $parameters['id'];
if (!DBA::exists('notify', ['id' => $id, 'uid' => $uid])) { if (!DBA::exists('notification', ['id' => $id, 'uid' => $uid])) {
DI::mstdnError()->RecordNotFound(); DI::mstdnError()->RecordNotFound();
} }
System::jsonExit(DI::mstdnNotification()->createFromNotifyId($id)); System::jsonExit(DI::mstdnNotification()->createFromNotificationId($id));
} }
$request = self::getRequest([ $request = self::getRequest([
@ -120,7 +120,7 @@ class Notifications extends BaseApi
$notify = DBA::select('notification', ['id'], $condition, $params); $notify = DBA::select('notification', ['id'], $condition, $params);
while ($notification = DBA::fetch($notify)) { while ($notification = DBA::fetch($notify)) {
$entry = DI::mstdnNotification()->createFromNotifyId($notification['id']); $entry = DI::mstdnNotification()->createFromNotificationId($notification['id']);
if (!empty($entry)) { if (!empty($entry)) {
$notifications[] = $entry; $notifications[] = $entry;
} }