Fix new posts not federating out

This commit is contained in:
Shadowfacts 2019-09-22 18:21:58 -04:00
parent 9002a45fa8
commit 715dfe4dfb
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ export async function signAndSend(activity: Activity, inbox: string) {
} }
async function sendToFollowers(activity: CreateActivity) { async function sendToFollowers(activity: CreateActivity) {
const followers = await getConnection().createQueryBuilder().select().from(Actor, "actor").where("actor.isFollower = :isFollower", { isFollower: true }).getMany(); const followers = await getConnection().getRepository(Actor).find({where: {isFollower: true}});
const inboxes = followers.map(it => "https://" + new URL(it.inbox).host + "/inbox"); const inboxes = followers.map(it => "https://" + new URL(it.inbox).host + "/inbox");
// convert to a Set to deduplicate inboxes // convert to a Set to deduplicate inboxes
(new Set(inboxes)).forEach(inbox => { (new Set(inboxes)).forEach(inbox => {