mirror of
https://github.com/friendica/friendica
synced 2025-04-24 04:30:11 +00:00
29 lines
829 B
PHP
29 lines
829 B
PHP
<?php
|
|
|
|
// Copyright (C) 2010-2024, the Friendica project
|
|
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
namespace Friendica\Module\Api\Twitter\DirectMessages;
|
|
|
|
use Friendica\Model\Contact;
|
|
use Friendica\Module\Api\Twitter\DirectMessagesEndpoint;
|
|
use Friendica\Module\BaseApi;
|
|
|
|
/**
|
|
* Returns the most recent direct messages sent to the user.
|
|
*
|
|
* @see https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-messages
|
|
*/
|
|
class Inbox extends DirectMessagesEndpoint
|
|
{
|
|
protected function rawContent(array $request = [])
|
|
{
|
|
$this->checkAllowedScope(BaseApi::SCOPE_READ);
|
|
$uid = BaseApi::getCurrentUserID();
|
|
$pcid = Contact::getPublicIdByUserId($uid);
|
|
|
|
$this->getMessages($request, $uid, ["`author-id` != ?", $pcid]);
|
|
}
|
|
}
|