Compare commits

..

No commits in common. "main" and "bugfix-no-replies-to-replies" have entirely different histories.

View File

@ -208,21 +208,18 @@ async function send_replies(argv, cf) {
status_id: status.id,
account: account.acct,
url: status.url,
in_reply_to_id: status.in_reply_to_id,
visibility: status.visibility
in_reply_to_id: status.in_reply_to_id
};
});
const newmentions = mentions.filter((m) => !oldids.includes(m.id));
for (const mention of newmentions) {
console.log(JSON.stringify(mention, null, 2));
if( mention.in_reply_to_id ) {
console.log(`won't reply to ${mention.id} as it's a reply to ${mention.in_reply_to_id}`);
} else {
console.log(`new mention ${mention.id}`);
const reply = {
id: mention.status_id,
account: `@${mention.account}`,
visibility: mention.visibility,
account: `@${mention.account}`
};
post(argv, cf, reply);
@ -257,7 +254,6 @@ async function post_image(image, alt_text, cf, reply) {
if( reply ) {
status_body["in_reply_to_id"] = reply.id;
status_body["status"] = reply.account;
status_body["visibility"] = reply.visibility;
}
headers['Accept'] = 'application/json';
headers['Content-Type'] = 'application/json';