aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-29 19:10:13 +0100
committerChocobozzz <me@florianbigard.com>2017-12-29 19:10:13 +0100
commitc5911fd347c76e8bdc05ea9f3ee9efed4a58c236 (patch)
treeb8d287daca6c45305090cbec9da97d1155f275bd /server/models/account/account.ts
parent8b0d42ee372de6589796be26b83e5bffb1b69cdf (diff)
downloadPeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.tar.gz
PeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.tar.zst
PeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.zip
Begin to add avatar to actors
Diffstat (limited to 'server/models/account/account.ts')
-rw-r--r--server/models/account/account.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/models/account/account.ts b/server/models/account/account.ts
index 1ee232537..d3503aaa3 100644
--- a/server/models/account/account.ts
+++ b/server/models/account/account.ts
@@ -13,6 +13,7 @@ import {
13 Table, 13 Table,
14 UpdatedAt 14 UpdatedAt
15} from 'sequelize-typescript' 15} from 'sequelize-typescript'
16import { Account } from '../../../shared/models/actors'
16import { isUserUsernameValid } from '../../helpers/custom-validators/users' 17import { isUserUsernameValid } from '../../helpers/custom-validators/users'
17import { sendDeleteActor } from '../../lib/activitypub/send' 18import { sendDeleteActor } from '../../lib/activitypub/send'
18import { ActorModel } from '../activitypub/actor' 19import { ActorModel } from '../activitypub/actor'
@@ -165,11 +166,12 @@ export class AccountModel extends Model<AccountModel> {
165 return AccountModel.findOne(query) 166 return AccountModel.findOne(query)
166 } 167 }
167 168
168 toFormattedJSON () { 169 toFormattedJSON (): Account {
169 const actor = this.Actor.toFormattedJSON() 170 const actor = this.Actor.toFormattedJSON()
170 const account = { 171 const account = {
171 id: this.id, 172 id: this.id,
172 name: this.name, 173 name: this.Actor.preferredUsername,
174 displayName: this.name,
173 createdAt: this.createdAt, 175 createdAt: this.createdAt,
174 updatedAt: this.updatedAt 176 updatedAt: this.updatedAt
175 } 177 }