diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-06 09:55:36 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-06 10:05:49 +0100 |
commit | 941c5eac1751ef93500d6afa58c4575f777dbff9 (patch) | |
tree | 765c99a830ff56f426d00e6155b1dad21e91269e /server/models/activitypub | |
parent | 0912f1b4caaa7394516567044f896132ad991131 (diff) | |
download | PeerTube-941c5eac1751ef93500d6afa58c4575f777dbff9.tar.gz PeerTube-941c5eac1751ef93500d6afa58c4575f777dbff9.tar.zst PeerTube-941c5eac1751ef93500d6afa58c4575f777dbff9.zip |
Add missing hotkeys to the watch page
Diffstat (limited to 'server/models/activitypub')
-rw-r--r-- | server/models/activitypub/actor.ts | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index 66a13b857..e539b579c 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts | |||
@@ -1,6 +1,5 @@ | |||
1 | import { values } from 'lodash' | 1 | import { values } from 'lodash' |
2 | import { extname } from 'path' | 2 | import { extname } from 'path' |
3 | import * as Sequelize from 'sequelize' | ||
4 | import { | 3 | import { |
5 | AllowNull, | 4 | AllowNull, |
6 | BelongsTo, | 5 | BelongsTo, |
@@ -48,7 +47,7 @@ import { | |||
48 | MActorWithInboxes | 47 | MActorWithInboxes |
49 | } from '../../typings/models' | 48 | } from '../../typings/models' |
50 | import * as Bluebird from 'bluebird' | 49 | import * as Bluebird from 'bluebird' |
51 | import { Op } from 'sequelize' | 50 | import { Op, Transaction } from 'sequelize' |
52 | 51 | ||
53 | enum ScopeNames { | 52 | enum ScopeNames { |
54 | FULL = 'FULL' | 53 | FULL = 'FULL' |
@@ -285,7 +284,7 @@ export class ActorModel extends Model<ActorModel> { | |||
285 | return ActorModel.scope(ScopeNames.FULL).findByPk(id) | 284 | return ActorModel.scope(ScopeNames.FULL).findByPk(id) |
286 | } | 285 | } |
287 | 286 | ||
288 | static loadFromAccountByVideoId (videoId: number, transaction: Sequelize.Transaction): Bluebird<MActor> { | 287 | static loadFromAccountByVideoId (videoId: number, transaction: Transaction): Bluebird<MActor> { |
289 | const query = { | 288 | const query = { |
290 | include: [ | 289 | include: [ |
291 | { | 290 | { |
@@ -329,11 +328,11 @@ export class ActorModel extends Model<ActorModel> { | |||
329 | .then(a => !!a) | 328 | .then(a => !!a) |
330 | } | 329 | } |
331 | 330 | ||
332 | static listByFollowersUrls (followersUrls: string[], transaction?: Sequelize.Transaction): Bluebird<MActorFull[]> { | 331 | static listByFollowersUrls (followersUrls: string[], transaction?: Transaction): Bluebird<MActorFull[]> { |
333 | const query = { | 332 | const query = { |
334 | where: { | 333 | where: { |
335 | followersUrl: { | 334 | followersUrl: { |
336 | [ Sequelize.Op.in ]: followersUrls | 335 | [ Op.in ]: followersUrls |
337 | } | 336 | } |
338 | }, | 337 | }, |
339 | transaction | 338 | transaction |
@@ -342,7 +341,7 @@ export class ActorModel extends Model<ActorModel> { | |||
342 | return ActorModel.scope(ScopeNames.FULL).findAll(query) | 341 | return ActorModel.scope(ScopeNames.FULL).findAll(query) |
343 | } | 342 | } |
344 | 343 | ||
345 | static loadLocalByName (preferredUsername: string, transaction?: Sequelize.Transaction): Bluebird<MActorFull> { | 344 | static loadLocalByName (preferredUsername: string, transaction?: Transaction): Bluebird<MActorFull> { |
346 | const query = { | 345 | const query = { |
347 | where: { | 346 | where: { |
348 | preferredUsername, | 347 | preferredUsername, |
@@ -373,7 +372,7 @@ export class ActorModel extends Model<ActorModel> { | |||
373 | return ActorModel.scope(ScopeNames.FULL).findOne(query) | 372 | return ActorModel.scope(ScopeNames.FULL).findOne(query) |
374 | } | 373 | } |
375 | 374 | ||
376 | static loadByUrl (url: string, transaction?: Sequelize.Transaction): Bluebird<MActorAccountChannelId> { | 375 | static loadByUrl (url: string, transaction?: Transaction): Bluebird<MActorAccountChannelId> { |
377 | const query = { | 376 | const query = { |
378 | where: { | 377 | where: { |
379 | url | 378 | url |
@@ -396,7 +395,7 @@ export class ActorModel extends Model<ActorModel> { | |||
396 | return ActorModel.unscoped().findOne(query) | 395 | return ActorModel.unscoped().findOne(query) |
397 | } | 396 | } |
398 | 397 | ||
399 | static loadByUrlAndPopulateAccountAndChannel (url: string, transaction?: Sequelize.Transaction): Bluebird<MActorFull> { | 398 | static loadByUrlAndPopulateAccountAndChannel (url: string, transaction?: Transaction): Bluebird<MActorFull> { |
400 | const query = { | 399 | const query = { |
401 | where: { | 400 | where: { |
402 | url | 401 | url |
@@ -483,7 +482,7 @@ export class ActorModel extends Model<ActorModel> { | |||
483 | return activityPubContextify(json) | 482 | return activityPubContextify(json) |
484 | } | 483 | } |
485 | 484 | ||
486 | getFollowerSharedInboxUrls (t: Sequelize.Transaction) { | 485 | getFollowerSharedInboxUrls (t: Transaction) { |
487 | const query = { | 486 | const query = { |
488 | attributes: [ 'sharedInboxUrl' ], | 487 | attributes: [ 'sharedInboxUrl' ], |
489 | include: [ | 488 | include: [ |