Fix broken dismiss endpoint on Mastodon notifications API

This commit is contained in:
Hank Grabowski 2022-11-30 14:11:39 -05:00
parent 35ca4961d2
commit 5b5c38f9ab
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,8 @@ class Dismiss extends BaseApi
DI::mstdnError()->UnprocessableEntity();
}
$Notification = DI::notification()->selectOneForUser($uid, $this->parameters['id']);
$condition = ['id' => $this->parameters['id']];
$Notification = DI::notification()->selectOneForUser($uid, $condition);
$Notification->setDismissed();
DI::notification()->save($Notification);