diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/activitypub/send/misc.ts | 4 | ||||
-rw-r--r-- | server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler.ts | 2 | ||||
-rw-r--r-- | server/models/video/video.ts | 2 | ||||
-rw-r--r-- | server/tests/api/single-server.ts | 4 |
4 files changed, 7 insertions, 5 deletions
diff --git a/server/lib/activitypub/send/misc.ts b/server/lib/activitypub/send/misc.ts index fe137464e..444c1cbd6 100644 --- a/server/lib/activitypub/send/misc.ts +++ b/server/lib/activitypub/send/misc.ts | |||
@@ -29,7 +29,7 @@ async function forwardActivity ( | |||
29 | 29 | ||
30 | if (uris.length === 0) { | 30 | if (uris.length === 0) { |
31 | logger.info('0 followers for %s, no forwarding.', toAccountFollowers.map(a => a.id).join(', ')) | 31 | logger.info('0 followers for %s, no forwarding.', toAccountFollowers.map(a => a.id).join(', ')) |
32 | return | 32 | return undefined |
33 | } | 33 | } |
34 | 34 | ||
35 | logger.debug('Creating forwarding job.', { uris }) | 35 | logger.debug('Creating forwarding job.', { uris }) |
@@ -52,7 +52,7 @@ async function broadcastToFollowers ( | |||
52 | const uris = await computeFollowerUris(toAccountFollowers, followersException) | 52 | const uris = await computeFollowerUris(toAccountFollowers, followersException) |
53 | if (uris.length === 0) { | 53 | if (uris.length === 0) { |
54 | logger.info('0 followers for %s, no broadcasting.', toAccountFollowers.map(a => a.id).join(', ')) | 54 | logger.info('0 followers for %s, no broadcasting.', toAccountFollowers.map(a => a.id).join(', ')) |
55 | return | 55 | return undefined |
56 | } | 56 | } |
57 | 57 | ||
58 | logger.debug('Creating broadcast job.', { uris }) | 58 | logger.debug('Creating broadcast job.', { uris }) |
diff --git a/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler.ts b/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler.ts index f1fe774cc..fcc81eb16 100644 --- a/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler.ts +++ b/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-job-scheduler.ts | |||
@@ -50,7 +50,7 @@ async function computeBody (payload: ActivityPubHttpPayload) { | |||
50 | if (!accountSignature) throw new Error('Unknown signature account id.') | 50 | if (!accountSignature) throw new Error('Unknown signature account id.') |
51 | body = await buildSignedActivity(accountSignature, payload.body) | 51 | body = await buildSignedActivity(accountSignature, payload.body) |
52 | } | 52 | } |
53 | 53 | ||
54 | return body | 54 | return body |
55 | } | 55 | } |
56 | 56 | ||
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 82b95c489..457bfce77 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -984,6 +984,7 @@ loadByUUIDOrURL = function (uuid: string, url: string, t?: Sequelize.Transaction | |||
984 | 984 | ||
985 | loadAndPopulateAccountAndServerAndTags = function (id: number) { | 985 | loadAndPopulateAccountAndServerAndTags = function (id: number) { |
986 | const options = { | 986 | const options = { |
987 | order: [ [ Video['sequelize'].models.Tag, 'name', 'ASC' ] ], | ||
987 | include: [ | 988 | include: [ |
988 | { | 989 | { |
989 | model: Video['sequelize'].models.VideoChannel, | 990 | model: Video['sequelize'].models.VideoChannel, |
@@ -1012,6 +1013,7 @@ loadAndPopulateAccountAndServerAndTags = function (id: number) { | |||
1012 | 1013 | ||
1013 | loadByUUIDAndPopulateAccountAndServerAndTags = function (uuid: string) { | 1014 | loadByUUIDAndPopulateAccountAndServerAndTags = function (uuid: string) { |
1014 | const options = { | 1015 | const options = { |
1016 | order: [ [ Video['sequelize'].models.Tag, 'name', 'ASC' ] ], | ||
1015 | where: { | 1017 | where: { |
1016 | uuid | 1018 | uuid |
1017 | }, | 1019 | }, |
diff --git a/server/tests/api/single-server.ts b/server/tests/api/single-server.ts index 11080085d..40e2c64fe 100644 --- a/server/tests/api/single-server.ts +++ b/server/tests/api/single-server.ts | |||
@@ -605,7 +605,7 @@ describe('Test a single server', function () { | |||
605 | expect(video.serverHost).to.equal('localhost:9001') | 605 | expect(video.serverHost).to.equal('localhost:9001') |
606 | expect(video.account).to.equal('root') | 606 | expect(video.account).to.equal('root') |
607 | expect(video.isLocal).to.be.true | 607 | expect(video.isLocal).to.be.true |
608 | expect(video.tags).to.deep.equal([ 'tag1', 'tag2', 'supertag' ]) | 608 | expect(video.tags).to.deep.equal([ 'supertag', 'tag1', 'tag2' ]) |
609 | expect(dateIsValid(video.createdAt)).to.be.true | 609 | expect(dateIsValid(video.createdAt)).to.be.true |
610 | expect(dateIsValid(video.updatedAt)).to.be.true | 610 | expect(dateIsValid(video.updatedAt)).to.be.true |
611 | 611 | ||
@@ -645,7 +645,7 @@ describe('Test a single server', function () { | |||
645 | expect(video.serverHost).to.equal('localhost:9001') | 645 | expect(video.serverHost).to.equal('localhost:9001') |
646 | expect(video.account).to.equal('root') | 646 | expect(video.account).to.equal('root') |
647 | expect(video.isLocal).to.be.true | 647 | expect(video.isLocal).to.be.true |
648 | expect(video.tags).to.deep.equal([ 'tag1', 'tag2', 'supertag' ]) | 648 | expect(video.tags).to.deep.equal([ 'supertag', 'tag1', 'tag2' ]) |
649 | expect(dateIsValid(video.createdAt)).to.be.true | 649 | expect(dateIsValid(video.createdAt)).to.be.true |
650 | expect(dateIsValid(video.updatedAt)).to.be.true | 650 | expect(dateIsValid(video.updatedAt)).to.be.true |
651 | 651 | ||