Because #BotsInSpace is shutting down () I'm looking for a new home for my bots.
I have an RSS feed which posts to BlueSky…
And I have Bridgy which converts BSky to Fediverse…
So… Welcome @openbenches.org !
(This is an experiment. Feedback welcome. I might try self-hosting. Not sure yet. I don't know how to move followers across.)
Thinking about this further… I would like your advice and wisdom on how I should self-host my many bots.
All one one sub-domain?
@bot1@bots.edent.tel
@bot2@bots.edent.tel
Separate sub-domain for each?
@bot@bot1.edent.tel
@bot@bot2.edent.tel
Buy a new domain for each?
(LOL nope!)
Something else?
(What?)
Thinking about creating a Mastodon instance only for automated accounts.
Wouldn't have to deal with replies, following accounts, or anything complicated.
I even had a comedy name picked out for it - but someone beat me to it.
OK! Want to self-host your own bots now #BotsInSpace is going away?
I've made the *simplest* possible server just for you!
https://gitlab.com/edent/activity-bot/
Upload two files to your server (index.php and .htaccess), fill in a couple of details, and… that's it!
This is designed for write-only bots. It isn't interactive, it won't store or reply to messages sent to it, but it will post hashtags, links, mentions, and images.
You can see the sample bot @bot
Feedback very welcome!
Update!
You can now move followers from your old bot accounts to your new self-hosted ones.
So now @solar@botsin.space points at @solar@solar.bots.edent.tel - and all the followers have moved!
Source code at https://gitlab.com/edent/activity-bot/
OK! My self-hosted ActivityPub Bot works with a few hundred followers.
I'm going to try and move @colours which has over 1,000 followers (WHY?!?!) and see if it copes with that.
All the code's at https://gitlab.com/edent/activity-bot/
Hmmm. About 1,000 followers have moved over to the new account - @colours
I can see my messages being sent. But they don't seem to be received. Not entirely sure what's going on and am half a bottle of Malbec into the evening, so probably shouldn't be futzing around with code.
One for the morning, I fear!
OK. What is going on here?
A bunch of people can see the posts sent out by @colours - but lots of people can't.
As far as I can see, Mastodon.social isn't sending me back an HTTP response when I send to a shared inbox. But other Mastodon-based servers happily accept it.
Here are the headers
https://gist.github.com/edent/1f41d1b2a50ab497e5d5f8d9e851caf1
Any help #ActivityPub friends?
Hmmm. My cURL Multi Handle is only showing 32 successful requests.
That *feels* like a suspicious number!
Yup. Weird cURL Multi Handle bug. Sending 1,000 at a time didn't work. Sending 15 did.
A bit slower, but not disastrous.
Alrighty! Next silly #ActivityPub question.
Why can't Mastodon see my followers?
https://socialhub.activitypub.rocks/t/list-of-followers-isnt-available-to-mastodon/4717
I *think* I've got this #ActivityPub syntax correct.
http://colours.bots.edent.tel/followers
That should be paginated followers, but I can't see the followers in any Mastodon client.
A few updates to #ActivityBot - the super simple Fediverse Bot Server you can run anywhere.
New features:
Send direct messages to users
Follow, Unfollow, Block, and Unblock other accounts
Bridge to BlueSky with your domain name via Bridgy Fed
Find out more - https://gitlab.com/edent/activity-bot/
Can someone who is better at #ActivityPub syntax tell me what I've done wrong?
My bot @colours has a list of all its followers at
https://colours.bots.edent.tel/followers
But they're not being picked up by Mastodon.
The MIME type is correct, the JSON is valid, the pagination works, it responds to signed requests.
What super-obvious thing am I missing here?
@Edent I thought I was following it, and I'm not now, but I am a far from reliable data point
@Edent If it helps, I can’t see posts from it and I’m on mstdn.social which I think is the same admins?
@jackmcconnell I'm wondering if my cURL Multi Handle has gone wrong somewhere?
@Edent "*feels* like a suspicious number" - ah, kabbalah debugging FTW
@brucelawson frankly, it's the only thing I've got!
@Edent In scripting languages, I tend to look at the feng shui of my indentation
@Edent I can confirm it works now: Hi!
@Edent Can you share the link to the actor JSON for the bot too, please? Could it be that it’s not properly referenced from there?
@lewis It is colours.bots.edent.tel/colours (but you have to request it with the right accept header.)
@Edent Thanks. It all looks correct to me comparing it to an implementation I built a while ago.
I'm not all that savvy with Ruby, but if I'm reading it right it looks like Mastodon might be looking for a `size` property instead of `totalItems` here: https://github.com/mastodon/mastodon/blob/871e3b25e8da711bc4e297ed23e476976e0cd0f8/app/serializers/activitypub/collection_serializer.rb#L30
I'm not confident I'm looking in the right place, but if you added `size` to the collection does it then show up?
@Edent FWIW, I have the same problem with my implementation. I can't even see Mastodon make the HTTP request to check it.
For example, with: https://phpc.social/deck/@blog@social.derickrethans.nl/followers
So please post when/if you get an answer!
@Edent I got this
@Edent Ever find any new info about this? I'm creating my follower endpoint now and curious if I need to do something undocumented
@librenews nope! Not a clue. And I don't know how to get Mastodon to force a refresh.
@Edent by any chance did you implement DMs so that you could link a domain name via Bridgy Fed?
@skylar NO! I did it for unrelated secret reasons!!!!
(ʸᵉˢ)
What comes to my mind, is the field "discoverable" for your actor.
Maybe i can check for details at a later time.
@simon yes, that's expected. What happens when you try to view the followers of that account in GoToSocial?
@Edent I use Phanpy as a front end as Gotosocial doesn't have a native one, but that returns a JSON object:
```
{"@context":"https://www.w3.org/ns/activitystreams","id":"https://colours.bots.edent.tel/followers","type":"OrderedCollection","totalItems":997,"first":"https://colours.bots.edent.tel/followers?page=1"}
```
@Edent Hey, I bookmarked this to check the replies later but I see you still haven't gotten anything that brings clarity. I've checked the JSON output myself twice but I can't find anything wrong with it.
My suggestion would be, if you're motivated enough to throw a little bit of money at the problem, to book a call with @thisismissem for it: https://support.thisismissem.social/#services If she can't find the issue with the output, she'd have the know-how to step through the Mastodon code to find the exact reason.
@julian @Edent it may be because Mastodon tries to avoid sync'ing the whole collection and has a non-standard (but there is a FEP iirc) way to do this: https://docs.joinmastodon.org/spec/activitypub/#follower-synchronization-mechanism
@thisismissem @julian
Ah! I see, I think.
So I add that header and, when example.social requests my followers, I send back a list of followers from example.social?
Seems a bit backwards, but I get it.
Will have a noodle and see if it works.
Ta!
@Edent On mastodon.me.uk and can see the account, but see it as 0 posts
@Edent Scratch that, looks like it just hadn’t retrieved posts. Looking now and I see 2 posts from the bot