"sensitive" is added to the API
This commit is contained in:
parent
0a6dff0618
commit
caa7b6f326
1 changed files with 4 additions and 1 deletions
|
@ -55,6 +55,7 @@ class Statuses extends BaseApi
|
|||
'status' => '', // Text content of the status. If media_ids is provided, this becomes optional. Attaching a poll is optional while status is provided.
|
||||
'media_ids' => [], // Array of Attachment ids to be attached as media. If provided, status becomes optional, and poll cannot be used.
|
||||
'in_reply_to_id' => 0, // ID of the status being replied to, if status is a reply
|
||||
'sensitive' => false, // Mark status and attached media as sensitive? Defaults to false.
|
||||
'spoiler_text' => '', // Text to be shown as a warning or subject before the actual content. Statuses are generally collapsed behind this field.
|
||||
'language' => '', // ISO 639 language code for this status.
|
||||
'media_attributes' => [],
|
||||
|
@ -83,6 +84,7 @@ class Statuses extends BaseApi
|
|||
$item['gravity'] = $post['gravity'];
|
||||
$item['verb'] = $post['verb'];
|
||||
$item['app'] = $this->getApp();
|
||||
$item['sensitive'] = $request['sensitive'];
|
||||
|
||||
if (!empty($request['language'])) {
|
||||
$item['language'] = json_encode([$request['language'] => 1]);
|
||||
|
@ -179,7 +181,7 @@ class Statuses extends BaseApi
|
|||
'poll' => [], // Poll data. If provided, media_ids cannot be used, and poll[expires_in] must be provided.
|
||||
'in_reply_to_id' => 0, // ID of the status being replied to, if status is a reply
|
||||
'quote_id' => 0, // ID of the message to quote
|
||||
'sensitive' => false, // Mark status and attached media as sensitive?
|
||||
'sensitive' => false, // Mark status and attached media as sensitive? Defaults to false.
|
||||
'spoiler_text' => '', // Text to be shown as a warning or subject before the actual content. Statuses are generally collapsed behind this field.
|
||||
'visibility' => '', // Visibility of the posted status. One of: "public", "unlisted", "private" or "direct".
|
||||
'scheduled_at' => '', // ISO 8601 Datetime at which to schedule a status. Providing this parameter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future.
|
||||
|
@ -198,6 +200,7 @@ class Statuses extends BaseApi
|
|||
$item['title'] = '';
|
||||
$item['body'] = $this->formatStatus($request['status'], $uid);
|
||||
$item['app'] = $this->getApp();
|
||||
$item['sensitive'] = $request['sensitive'];
|
||||
$item['visibility'] = $request['visibility'];
|
||||
|
||||
switch ($request['visibility']) {
|
||||
|
|
Loading…
Reference in a new issue