fix: fileid min length issue
This commit is contained in:
parent
f1c827b815
commit
817203a9e1
1 changed files with 4 additions and 2 deletions
|
@ -1145,7 +1145,7 @@ export default class Misskey implements MegalodonInterface {
|
||||||
status?: string
|
status?: string
|
||||||
spoiler_text?: string
|
spoiler_text?: string
|
||||||
sensitive?: boolean
|
sensitive?: boolean
|
||||||
media_ids?: Array<string>
|
media_ids?: Array<string> | null
|
||||||
poll?: { options?: Array<string>; expires_in?: number; multiple?: boolean; hide_totals?: boolean }
|
poll?: { options?: Array<string>; expires_in?: number; multiple?: boolean; hide_totals?: boolean }
|
||||||
visibility?: "public" | "unlisted" | "private" | "direct"
|
visibility?: "public" | "unlisted" | "private" | "direct"
|
||||||
}
|
}
|
||||||
|
@ -1155,10 +1155,12 @@ export default class Misskey implements MegalodonInterface {
|
||||||
text: _options.status
|
text: _options.status
|
||||||
}
|
}
|
||||||
if (_options) {
|
if (_options) {
|
||||||
if (_options.media_ids) {
|
if (_options.media_ids && _options.media_ids.length > 0) {
|
||||||
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