attributes: [ 'id', 'name' ],
include: [
{
- attributes: [ 'id', 'uuid', 'preferredUsername', 'url', 'serverId', 'avatarId' ],
+ attributes: [ 'id', 'preferredUsername', 'url', 'serverId', 'avatarId' ],
model: ActorModel.unscoped(),
required: true,
where: whereActor,
return AccountModel.findByPk(id, { transaction })
}
- static loadByUUID (uuid: string) {
- const query = {
- include: [
- {
- model: ActorModel,
- required: true,
- where: {
- uuid
- }
- }
- ]
- }
-
- return AccountModel.findOne(query)
- }
-
static loadByNameWithHost (nameWithHost: string) {
const [ accountName, host ] = nameWithHost.split('@')
return {
id: this.id,
- uuid: actor.uuid,
name: actor.name,
displayName: this.getDisplayName(),
url: actor.url,