mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-10 09:04:26 +02:00
Fixed max value check, improved request value fetching
This commit is contained in:
parent
a3173ccb50
commit
720a43461d
12 changed files with 53 additions and 65 deletions
|
@ -49,6 +49,8 @@ class Seen extends BaseApi
|
|||
|
||||
$id = intval($request['id'] ?? 0);
|
||||
|
||||
$include_entities = $this->getRequestValue($request, 'include_entities', false);
|
||||
|
||||
try {
|
||||
$Notify = DI::notify()->selectOneById($id);
|
||||
if ($Notify->uid !== $uid) {
|
||||
|
@ -65,8 +67,6 @@ class Seen extends BaseApi
|
|||
if ($Notify->otype === Notification\ObjectType::ITEM) {
|
||||
$item = Post::selectFirstForUser($uid, [], ['id' => $Notify->iid, 'uid' => $uid]);
|
||||
if (DBA::isResult($item)) {
|
||||
$include_entities = filter_var($request['include_entities'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
// we found the item, return it to the user
|
||||
$ret = [DI::twitterStatus()->createFromUriId($item['uri-id'], $item['uid'], $include_entities)->toArray()];
|
||||
$data = ['status' => $ret];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue