pl-api: define support for status preview for mitra
Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
committed by
Nicole Mikołajczyk
parent
10aa9e4381
commit
d9f7844411
@ -2004,7 +2004,11 @@ class PlApiClient {
|
||||
fixedParams.visibility = 'circle';
|
||||
}
|
||||
|
||||
const response = await this.request('/api/v1/statuses', {
|
||||
const input = params.preview && this.features.version.software === MITRA
|
||||
? '/api/v1/statuses/preview'
|
||||
: '/api/v1/statuses';
|
||||
|
||||
const response = await this.request(input, {
|
||||
method: 'POST',
|
||||
body: fixedParams,
|
||||
});
|
||||
|
||||
@ -472,10 +472,12 @@ const getFeatures = (instance: Instance) => {
|
||||
|
||||
/**
|
||||
* @see POST /api/v1/statuses
|
||||
* @see POST /api/v1/statuses/preview
|
||||
*/
|
||||
createStatusPreview: any([
|
||||
v.software === AKKOMA,
|
||||
v.software === PLEROMA,
|
||||
v.software === MITRA,
|
||||
]),
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user