if (t.host) {
return {
[Op.and]: [
- ActorModel.wherePreferredUsername(t.name, '$preferredUsername$'),
+ ActorModel.wherePreferredUsername(t.name),
{ $host$: t.host }
]
}
return {
[Op.and]: [
- ActorModel.wherePreferredUsername(t.name, '$preferredUsername$'),
+ ActorModel.wherePreferredUsername(t.name),
{ $serverId$: null }
]
}
const query = {
where: {
[Op.and]: [
- this.wherePreferredUsername(preferredUsername),
+ this.wherePreferredUsername(preferredUsername, '"ActorModel"."preferredUsername"'),
{
serverId: null
}
static loadByNameAndHost (preferredUsername: string, host: string): Promise<MActorFull> {
const query = {
- where: this.wherePreferredUsername(preferredUsername),
+ where: this.wherePreferredUsername(preferredUsername, '"ActorModel"."preferredUsername"'),
include: [
{
model: ServerModel,
required: true,
where: {
[Op.and]: [
- ActorModel.wherePreferredUsername(name),
+ ActorModel.wherePreferredUsername(name, 'Actor.preferredUsername'),
{ serverId: null }
]
},
{
model: ActorModel,
required: true,
- where: ActorModel.wherePreferredUsername(name),
+ where: ActorModel.wherePreferredUsername(name, 'Actor.preferredUsername'),
include: [
{
model: ServerModel,