api/inbox confusion
Wonder if anyone can help with this confusion I have.
the inbox is set up here in server.js
app.use('/api/inbox', cors(), routes.inbox);
but the inbox postmarks seems to send to in activitypub.js is
for (const follower of followers) {
const inbox = `${follower}/inbox`;
When I set up 2 postmark instances and follow each other i never see posts appear at either instance. With the above code I don't understand how it ever could. Could anyone point to the code that I am missing? Where do we send messages to /api/inbox??
I think you're right, it must have never got swapped out when there was a more formal way of grabbing the user's inbox. It looks like the actor json reports that each postmark account's inbox is at `/api/inbox' which means any AP server that is properly grabbing the inbox will still be able to send you activities. https://github.com/ckolderup/postmarks/blob/fb1361aeb229826c28143a3082dd052088eb2996/src/activity-pub-db.js#L32
And also, any AP server that doesn't use the traditional {user}/inbox will not be receiving bookmark create activities (related: #124)
It should be swapped to use https://github.com/ckolderup/postmarks/blob/fb1361aeb229826c28143a3082dd052088eb2996/src/activitypub.js#L186 (which is what is being used to handle follow requests).
the postmarks<->postmarks stuff (and the network page) got shipped in verrrry rough shape-- I was moving way too fast while I experimented with the "network" page just before the initial release and probably had some pieces working and some pieces breaking and then committed the wrong ones.
If this is a problem, seems like some of the other assumptions about various actor endpoints in activity-pub-db.js are wrong too, no?
so far as I experiment with it most other things work. it's just the instance to instance communication that seems to not work when I remix 2 vanilla postmarks instances and get them to connect. They can follow each other but the posts never make it to the other instances. I solved this for myself locally by putting the inbox route in both locations but as I did it I knew it might not be the best answer.
If this is a problem, seems like some of the other assumptions about various actor endpoints in
activity-pub-db.jsare wrong too, no?
I'd have to look at it deeper, but I think everything in activity-pub-db.js is related specifically to your own postmarks instance? Like, actorJson() is only called when postmarks is displaying our user information to another server, in which case it's probably fine for that to have your own specific /api/inbox setup.
I'm trying to think if there's any other instance where we would be grabbing external user info, I think everything under /inbox is correct where we fetch actor information and parse it before sending Accept messages, which would mean you or someone else already figured it was being handled incorrectly and we just missed a couple of the hardcoded inbox references
https://github.com/ckolderup/postmarks/blob/18f602196313b6b5e0fcd1ad71b87d37129c00dd/src/activitypub.js#L265