forked from shadowfacts/shadowfacts.net
Fix new posts not federating out
This commit is contained in:
parent
9002a45fa8
commit
715dfe4dfb
|
@ -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 => {
|
||||||
|
|
Loading…
Reference in New Issue