diff --git a/dist/js/main.js b/dist/js/main.js index a59f6eb..90a87a0 100644 --- a/dist/js/main.js +++ b/dist/js/main.js @@ -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 diff --git a/src/status.c b/src/status.c index 25e695a..34025e1 100644 --- a/src/status.c +++ b/src/status.c @@ -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,