ActivityPub-federated video streaming platform using P2P directly in your web browser
Add toot:discoverable support
Chocobozzzc82dd858e881
diff --git a/packages/models/src/activitypub/activitypub-actor.ts b/packages/models/src/activitypub/activitypub-actor.tsindex d0f56ddedf..1cb57e3370 100644--- a/packages/models/src/activitypub/activitypub-actor.ts+++ b/packages/models/src/activitypub/activitypub-actor.ts@@ -43,4 +43,5 @@ export interface ActivityPubActor {playerSettings?: stringindexable?: boolean+ discoverable?: boolean}diff --git a/packages/tests/src/api/activitypub/client.ts b/packages/tests/src/api/activitypub/client.tsindex 5b403068e3..9dafc153ed 100644--- a/packages/tests/src/api/activitypub/client.ts+++ b/packages/tests/src/api/activitypub/client.ts@@ -47,6 +47,7 @@ describe('Test ActivityPub', function () {expect(object.preferredUsername).to.equal('root')expect(object.indexable).to.be.true+ expect(object.discoverable).to.be.trueif (hasIcon) {expect(arrayify(object.icon).map(i => i.width)).to.deep.equal([ 120, 48, 600, 1500 ])@@ -75,6 +76,7 @@ describe('Test ActivityPub', function () {expect(object.preferredUsername).to.equal('root_channel')expect(object.indexable).to.be.true+ expect(object.discoverable).to.be.trueif (hasIcon) {expect(arrayify(object.icon).map(i => i.width)).to.deep.equal([ 120, 48, 600, 1500 ])diff --git a/server/core/helpers/activity-pub-utils.ts b/server/core/helpers/activity-pub-utils.tsindex 06eaa8f997..ed821dc43c 100644--- a/server/core/helpers/activity-pub-utils.ts+++ b/server/core/helpers/activity-pub-utils.ts@@ -258,7 +258,8 @@ const contextStore: { [id in ContextType]: (string | { [id: string]: string })[]postingRestrictedToMods: 'lemmy:postingRestrictedToMods',toot: 'http://joinmastodon.org/ns#',- indexable: 'toot:indexable'+ indexable: 'toot:indexable',+ discoverable: 'toot:discoverable'}),WatchAction: buildContext({diff --git a/server/core/models/actor/actor.ts b/server/core/models/actor/actor.tsindex 0b9b0bf162..f3b809d909 100644--- a/server/core/models/actor/actor.ts+++ b/server/core/models/actor/actor.ts@@ -738,6 +738,7 @@ export class ActorModel extends SequelizeModel<ActorModel> {published: this.getCreatedAt().toISOString(),indexable: true,+ discoverable: true,icon,