Compare commits

..

No commits in common. "main" and "feature-replies" have entirely different histories.

3 changed files with 10 additions and 31 deletions

View File

@ -1,17 +1,5 @@
# CHANGELOG.md # CHANGELOG.md
## v1.2.3
Gave the bot the ability to reply with a customised pattern
## v1.2.1
Minor refactoring
## v1.2.0
I think this was when I added the gotosocial bot
## v1.1.1 ## v1.1.1
Made the flashing transitions a bit better, but it still needs more work Made the flashing transitions a bit better, but it still needs more work
@ -31,4 +19,4 @@ Added palettes
## v1.0.0 ## v1.0.0
First deployed version First deployed version

View File

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

View File

@ -8,7 +8,7 @@ toc: false
colourful generative patterns using [d3](https://d3js.org/) and [Observable Framework](https://observablehq.com/framework/) colourful generative patterns using [d3](https://d3js.org/) and [Observable Framework](https://observablehq.com/framework/)
<p>v1.2.3 | by <a href="https://mikelynch.org">mike lynch</a> | <a href="https://aus.social/@mikelynch">@mikelynch@aus.social</a> | <a href="https://git.tilde.town/bombinans/poptimal">source</a> | <a href="https://mikelynch.org/2025/Mar/09/poptimal/">about</a></p> <p>v1.2.2 | by <a href="https://mikelynch.org">mike lynch</a> | <a href="https://aus.social/@mikelynch">@mikelynch@aus.social</a> | <a href="https://git.tilde.town/bombinans/poptimal">source</a> | <a href="https://mikelynch.org/2025/Mar/09/poptimal/">about</a></p>
<div class="grid grid-cols-3"> <div class="grid grid-cols-3">