olafmoriarty / blue-bots-done-quick

A version of Cheap Bots, Done Quick written for Bluesky
Apache License 2.0
13 stars 1 forks source link

Bot won't post when Tracery code is long #4

Closed 03Sys closed 3 months ago

03Sys commented 3 months ago

I have two Bluesky bots, CV03BOT and HaSeul Bot. I used the site for them. The lines of the Tracery code of CV03BOT is 2778 and HaSeul Bot has 5147. It takes a little while to save HaSeul Bot, then it never posts or replies. I believe each image added do not exceed 1MB.

olafmoriarty commented 3 months ago

Hi,

looked into this, and the reason this bot never posted or replied was that there was a line of code that ensures that the bot would only post if there was actually some text to post. Unfortunately, this check occured after all image tags had been stripped out, so when trying to post a message that consisted only of an image tag, nothing would be posted at all.

I have changed this now, so that if there are images and there is no text to post, the post text will be set to a single space, making the post go through. I managed to post one of your images to my test account, and it functioned as intended.

The length of the tracery code was not the issue here - the tracery code was parsed and a post was generated correctly, it was just never sent to Bluesky.