mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 09:13:08 +02:00
fix: checks
This commit is contained in:
parent
354937abdd
commit
d521e95dda
2 changed files with 2 additions and 4 deletions
|
@ -219,7 +219,7 @@ export class ApiStatusMastodon {
|
||||||
const client = getClient(BASE_URL, accessTokens);
|
const client = getClient(BASE_URL, accessTokens);
|
||||||
const body: any = _request.body;
|
const body: any = _request.body;
|
||||||
try {
|
try {
|
||||||
if (body.media_ids) body.media_ids = undefined;
|
if (!body.media_ids) body.media_ids = undefined;
|
||||||
if (body.media_ids && !body.media_ids.length) body.media_ids = undefined;
|
if (body.media_ids && !body.media_ids.length) body.media_ids = undefined;
|
||||||
if (body.media_ids) {
|
if (body.media_ids) {
|
||||||
body.media_ids = (body.media_ids as string[]).map((p) => convertId(p, IdType.SharkeyId));
|
body.media_ids = (body.media_ids as string[]).map((p) => convertId(p, IdType.SharkeyId));
|
||||||
|
|
|
@ -1155,12 +1155,10 @@ export default class Misskey implements MegalodonInterface {
|
||||||
text: _options.status
|
text: _options.status
|
||||||
}
|
}
|
||||||
if (_options) {
|
if (_options) {
|
||||||
if (_options.media_ids && _options.media_ids.length > 0) {
|
if (_options.media_ids) {
|
||||||
params = Object.assign(params, {
|
params = Object.assign(params, {
|
||||||
fileIds: _options.media_ids
|
fileIds: _options.media_ids
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
_options.media_ids = null;
|
|
||||||
}
|
}
|
||||||
if (_options.poll) {
|
if (_options.poll) {
|
||||||
let pollParam = {
|
let pollParam = {
|
||||||
|
|
Loading…
Reference in a new issue