class Notification extends BaseFactory
{
- public function createFromNotifyId(int $id)
+ public function createFromNotificationId(int $id)
{
$notification = DBA::selectFirst('notification', [], ['id' => $id]);
if (!DBA::isResult($notification)) {
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([
$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;
}