ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix sending activities to gotosocial
Chocobozzzee6e7bad6389
diff --git a/server/core/models/actor/actor-follow.ts b/server/core/models/actor/actor-follow.tsindex 3eb6a01927..d24ae5dd04 100644--- a/server/core/models/actor/actor-follow.ts+++ b/server/core/models/actor/actor-follow.ts@@ -733,12 +733,17 @@ export class ActorFollowModel extends SequelizeModel<ActorFollowModel> {secondJoin = 'targetActorId'}+ // Some remote actors (e.g. GoToSocial) don't expose a shared inbox, so fall back to their individual inbox+ const columnUrlExpr = columnUrl === 'sharedInboxUrl'+ ? 'COALESCE("Follows"."sharedInboxUrl", "Follows"."inboxUrl")'+ : `"Follows"."${columnUrl}"`+const selections: string[] = []selections.push(distinct === true- ? `DISTINCT("Follows"."${columnUrl}") AS "selectionUrl"`- : `"Follows"."${columnUrl}" AS "selectionUrl"`+ ? `DISTINCT(${columnUrlExpr}) AS "selectionUrl"`+ : `${columnUrlExpr} AS "selectionUrl"`)if (selectTotal) selections.push('COUNT(*) AS "total"')@@ -749,7 +754,7 @@ export class ActorFollowModel extends SequelizeModel<ActorFollowModel> {let query = 'SELECT ' + selection + ' FROM "actor" ' +'INNER JOIN "actorFollow" ON "actorFollow"."' + firstJoin + '" = "actor"."id" ' +'INNER JOIN "actor" AS "Follows" ON "actorFollow"."' + secondJoin + '" = "Follows"."id" ' +- `WHERE "actor"."id" = ANY ($actorIds) AND "actorFollow"."state" = 'accepted' AND "Follows"."${columnUrl}" IS NOT NULL `+ `WHERE "actor"."id" = ANY ($actorIds) AND "actorFollow"."state" = 'accepted' AND ${columnUrlExpr} IS NOT NULL `if (count !== undefined) query += 'LIMIT ' + countif (start !== undefined) query += ' OFFSET ' + start