Standards
This commit is contained in:
parent
fd63421dde
commit
c18bda9397
|
@ -91,7 +91,7 @@ class DirectMessage extends BaseFactory
|
|||
}
|
||||
} else {
|
||||
$title = '';
|
||||
$text = $mail['title'] . "\n" . HTML::toPlaintext(BBCode::convertForUriId($mail['uri-id'], $mail['body'], BBCode::API), 0);
|
||||
$text = $mail['title'] . "\n" . HTML::toPlaintext(BBCode::convertForUriId($mail['uri-id'], $mail['body'], BBCode::API), 0);
|
||||
}
|
||||
|
||||
$pcid = Contact::getPublicIdByUserId($uid);
|
||||
|
|
|
@ -32,7 +32,7 @@ class All extends DirectMessagesEndpoint
|
|||
protected function rawContent(array $request = [])
|
||||
{
|
||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
$this->getMessages($request, $uid, []);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ class Conversation extends DirectMessagesEndpoint
|
|||
protected function rawContent(array $request = [])
|
||||
{
|
||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
$this->getMessages($request, $uid, ["`parent-uri` = ?", $request['uri'] ?? '']);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ class Destroy extends BaseApi
|
|||
BaseApi::checkAllowedScope(BaseApi::SCOPE_WRITE);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
$id = filter_var($request['id'] ?? 0, FILTER_VALIDATE_INT);
|
||||
$id = filter_var($request['id'] ?? 0, FILTER_VALIDATE_INT);
|
||||
$verbose = filter_var($request['friendica_verbose'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
$parenturi = $request['friendica_parenturi'] ?? '';
|
||||
|
|
|
@ -25,6 +25,7 @@ use Friendica\Database\DBA;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Module\BaseApi;
|
||||
|
||||
abstract class DirectMessagesEndpoint extends BaseApi
|
||||
{
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user