diff options
author | Chocobozzz <me@florianbigard.com> | 2019-10-23 11:33:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-10-23 11:33:53 +0200 |
commit | 47581df0737ebcc058a5863143c752f9112a4424 (patch) | |
tree | 3b64e3fc49de4bea41d8fd852201ba3abb6b4994 /server/initializers | |
parent | a0e6d267598839c8a5508a65876ce0e07d1b3d74 (diff) | |
download | PeerTube-47581df0737ebcc058a5863143c752f9112a4424.tar.gz PeerTube-47581df0737ebcc058a5863143c752f9112a4424.tar.zst PeerTube-47581df0737ebcc058a5863143c752f9112a4424.zip |
Fix federation with some actors
That don't have a shared inbox, or a URL
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/constants.ts | 6 | ||||
-rw-r--r-- | server/initializers/migrations/0445-shared-inbox-optional.ts | 26 |
2 files changed, 30 insertions, 2 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 10f95f5ab..190fd427a 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -14,7 +14,7 @@ import { CONFIG, registerConfigChangedHandler } from './config' | |||
14 | 14 | ||
15 | // --------------------------------------------------------------------------- | 15 | // --------------------------------------------------------------------------- |
16 | 16 | ||
17 | const LAST_MIGRATION_VERSION = 440 | 17 | const LAST_MIGRATION_VERSION = 445 |
18 | 18 | ||
19 | // --------------------------------------------------------------------------- | 19 | // --------------------------------------------------------------------------- |
20 | 20 | ||
@@ -459,7 +459,9 @@ const ACTIVITY_PUB = { | |||
459 | const ACTIVITY_PUB_ACTOR_TYPES: { [ id: string ]: ActivityPubActorType } = { | 459 | const ACTIVITY_PUB_ACTOR_TYPES: { [ id: string ]: ActivityPubActorType } = { |
460 | GROUP: 'Group', | 460 | GROUP: 'Group', |
461 | PERSON: 'Person', | 461 | PERSON: 'Person', |
462 | APPLICATION: 'Application' | 462 | APPLICATION: 'Application', |
463 | ORGANIZATION: 'Organization', | ||
464 | SERVICE: 'Service' | ||
463 | } | 465 | } |
464 | 466 | ||
465 | const HTTP_SIGNATURE = { | 467 | const HTTP_SIGNATURE = { |
diff --git a/server/initializers/migrations/0445-shared-inbox-optional.ts b/server/initializers/migrations/0445-shared-inbox-optional.ts new file mode 100644 index 000000000..dad2d6569 --- /dev/null +++ b/server/initializers/migrations/0445-shared-inbox-optional.ts | |||
@@ -0,0 +1,26 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | |||
3 | async function up (utils: { | ||
4 | transaction: Sequelize.Transaction, | ||
5 | queryInterface: Sequelize.QueryInterface, | ||
6 | sequelize: Sequelize.Sequelize, | ||
7 | db: any | ||
8 | }): Promise<void> { | ||
9 | { | ||
10 | const data = { | ||
11 | type: Sequelize.STRING, | ||
12 | allowNull: true | ||
13 | } | ||
14 | |||
15 | await utils.queryInterface.changeColumn('actor', 'sharedInboxUrl', data) | ||
16 | } | ||
17 | } | ||
18 | |||
19 | function down (options) { | ||
20 | throw new Error('Not implemented.') | ||
21 | } | ||
22 | |||
23 | export { | ||
24 | up, | ||
25 | down | ||
26 | } | ||