Fix file ids

FossilOrigin-Name: de0da6d03cccb0b3ad76b3595aa834feca563603d54563a0fc43ad1a32209b60
This commit is contained in:
nekobit 2022-07-14 05:34:31 +00:00
parent 7e1b555925
commit 65300b6ce8
2 changed files with 3 additions and 2 deletions

3
dist/js/main.js vendored
View file

@ -306,7 +306,8 @@
for (let i of items)
{
ids.push(i.dataset.id);
if (i.dataset.id)
ids.push(i.dataset.id);
}
// Goto statusbox

View file

@ -121,7 +121,7 @@ int try_post_status(struct session* ssn, mastodont_t* api)
.in_reply_to_id = keystr(ssn->post.replyid),
.language = NULL,
.media_ids = media_ids,
.media_ids_len = (media_ids ? keyfile(ssn->post.files).array_size :
.media_ids_len = (!ssn->post.file_ids.is_set ? keyfile(ssn->post.files).array_size :
(json_ids ? json_ids_len : 0)),
.poll = NULL,
.preview = 0,