Standards
This commit is contained in:
parent
fd63421dde
commit
c18bda9397
5 changed files with 5 additions and 4 deletions
|
@ -91,7 +91,7 @@ class DirectMessage extends BaseFactory
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$title = '';
|
$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);
|
$pcid = Contact::getPublicIdByUserId($uid);
|
||||||
|
|
|
@ -32,7 +32,7 @@ class All extends DirectMessagesEndpoint
|
||||||
protected function rawContent(array $request = [])
|
protected function rawContent(array $request = [])
|
||||||
{
|
{
|
||||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
||||||
$uid = BaseApi::getCurrentUserID();
|
$uid = BaseApi::getCurrentUserID();
|
||||||
|
|
||||||
$this->getMessages($request, $uid, []);
|
$this->getMessages($request, $uid, []);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Conversation extends DirectMessagesEndpoint
|
||||||
protected function rawContent(array $request = [])
|
protected function rawContent(array $request = [])
|
||||||
{
|
{
|
||||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
||||||
$uid = BaseApi::getCurrentUserID();
|
$uid = BaseApi::getCurrentUserID();
|
||||||
|
|
||||||
$this->getMessages($request, $uid, ["`parent-uri` = ?", $request['uri'] ?? '']);
|
$this->getMessages($request, $uid, ["`parent-uri` = ?", $request['uri'] ?? '']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Destroy extends BaseApi
|
||||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_WRITE);
|
BaseApi::checkAllowedScope(BaseApi::SCOPE_WRITE);
|
||||||
$uid = BaseApi::getCurrentUserID();
|
$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);
|
$verbose = filter_var($request['friendica_verbose'] ?? false, FILTER_VALIDATE_BOOLEAN);
|
||||||
|
|
||||||
$parenturi = $request['friendica_parenturi'] ?? '';
|
$parenturi = $request['friendica_parenturi'] ?? '';
|
||||||
|
|
|
@ -25,6 +25,7 @@ use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Module\BaseApi;
|
use Friendica\Module\BaseApi;
|
||||||
|
|
||||||
abstract class DirectMessagesEndpoint extends BaseApi
|
abstract class DirectMessagesEndpoint extends BaseApi
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue