aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/models/actor/actor-follow.ts4
-rw-r--r--server/models/actor/actor.ts4
-rw-r--r--server/models/video/video-channel.ts4
3 files changed, 6 insertions, 6 deletions
diff --git a/server/models/actor/actor-follow.ts b/server/models/actor/actor-follow.ts
index 0f199d208..71ce9fa6f 100644
--- a/server/models/actor/actor-follow.ts
+++ b/server/models/actor/actor-follow.ts
@@ -311,7 +311,7 @@ export class ActorFollowModel extends Model<Partial<AttributesOnly<ActorFollowMo
311 if (t.host) { 311 if (t.host) {
312 return { 312 return {
313 [Op.and]: [ 313 [Op.and]: [
314 ActorModel.wherePreferredUsername(t.name, '$preferredUsername$'), 314 ActorModel.wherePreferredUsername(t.name),
315 { $host$: t.host } 315 { $host$: t.host }
316 ] 316 ]
317 } 317 }
@@ -319,7 +319,7 @@ export class ActorFollowModel extends Model<Partial<AttributesOnly<ActorFollowMo
319 319
320 return { 320 return {
321 [Op.and]: [ 321 [Op.and]: [
322 ActorModel.wherePreferredUsername(t.name, '$preferredUsername$'), 322 ActorModel.wherePreferredUsername(t.name),
323 { $serverId$: null } 323 { $serverId$: null }
324 ] 324 ]
325 } 325 }
diff --git a/server/models/actor/actor.ts b/server/models/actor/actor.ts
index 1524e0533..80a646c77 100644
--- a/server/models/actor/actor.ts
+++ b/server/models/actor/actor.ts
@@ -381,7 +381,7 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> {
381 const query = { 381 const query = {
382 where: { 382 where: {
383 [Op.and]: [ 383 [Op.and]: [
384 this.wherePreferredUsername(preferredUsername), 384 this.wherePreferredUsername(preferredUsername, '"ActorModel"."preferredUsername"'),
385 { 385 {
386 serverId: null 386 serverId: null
387 } 387 }
@@ -431,7 +431,7 @@ export class ActorModel extends Model<Partial<AttributesOnly<ActorModel>>> {
431 431
432 static loadByNameAndHost (preferredUsername: string, host: string): Promise<MActorFull> { 432 static loadByNameAndHost (preferredUsername: string, host: string): Promise<MActorFull> {
433 const query = { 433 const query = {
434 where: this.wherePreferredUsername(preferredUsername), 434 where: this.wherePreferredUsername(preferredUsername, '"ActorModel"."preferredUsername"'),
435 include: [ 435 include: [
436 { 436 {
437 model: ServerModel, 437 model: ServerModel,
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index 306bc6ade..0fb52827e 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -702,7 +702,7 @@ export class VideoChannelModel extends Model<Partial<AttributesOnly<VideoChannel
702 required: true, 702 required: true,
703 where: { 703 where: {
704 [Op.and]: [ 704 [Op.and]: [
705 ActorModel.wherePreferredUsername(name), 705 ActorModel.wherePreferredUsername(name, 'Actor.preferredUsername'),
706 { serverId: null } 706 { serverId: null }
707 ] 707 ]
708 }, 708 },
@@ -728,7 +728,7 @@ export class VideoChannelModel extends Model<Partial<AttributesOnly<VideoChannel
728 { 728 {
729 model: ActorModel, 729 model: ActorModel,
730 required: true, 730 required: true,
731 where: ActorModel.wherePreferredUsername(name), 731 where: ActorModel.wherePreferredUsername(name, 'Actor.preferredUsername'),
732 include: [ 732 include: [
733 { 733 {
734 model: ServerModel, 734 model: ServerModel,