+ static loadAccountIdFromVideo (videoId: number): Promise<MAccount> {
+ const query = {
+ include: [
+ {
+ attributes: [ 'id', 'accountId' ],
+ model: VideoChannelModel.unscoped(),
+ required: true,
+ include: [
+ {
+ attributes: [ 'id', 'channelId' ],
+ model: VideoModel.unscoped(),
+ where: {
+ id: videoId
+ }
+ }
+ ]
+ }
+ ]
+ }
+
+ return AccountModel.findOne(query)
+ }
+
+ static listLocalsForSitemap (sort: string): Promise<MAccountActor[]> {