diff options
Diffstat (limited to 'server/models/account/account.ts')
-rw-r--r-- | server/models/account/account.ts | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/server/models/account/account.ts b/server/models/account/account.ts index ec4e8d946..396959352 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts | |||
@@ -28,8 +28,9 @@ import { | |||
28 | MAccountAP, | 28 | MAccountAP, |
29 | MAccountDefault, | 29 | MAccountDefault, |
30 | MAccountFormattable, | 30 | MAccountFormattable, |
31 | MAccountHost, | ||
31 | MAccountSummaryFormattable, | 32 | MAccountSummaryFormattable, |
32 | MChannelActor | 33 | MChannelHost |
33 | } from '../../types/models' | 34 | } from '../../types/models' |
34 | import { ActorModel } from '../actor/actor' | 35 | import { ActorModel } from '../actor/actor' |
35 | import { ActorFollowModel } from '../actor/actor-follow' | 36 | import { ActorFollowModel } from '../actor/actor-follow' |
@@ -410,10 +411,6 @@ export class AccountModel extends Model<Partial<AttributesOnly<AccountModel>>> { | |||
410 | .findAll(query) | 411 | .findAll(query) |
411 | } | 412 | } |
412 | 413 | ||
413 | getClientUrl () { | ||
414 | return WEBSERVER.URL + '/accounts/' + this.Actor.getIdentifier() | ||
415 | } | ||
416 | |||
417 | toFormattedJSON (this: MAccountFormattable): Account { | 414 | toFormattedJSON (this: MAccountFormattable): Account { |
418 | return { | 415 | return { |
419 | ...this.Actor.toFormattedJSON(), | 416 | ...this.Actor.toFormattedJSON(), |
@@ -463,8 +460,9 @@ export class AccountModel extends Model<Partial<AttributesOnly<AccountModel>>> { | |||
463 | return this.name | 460 | return this.name |
464 | } | 461 | } |
465 | 462 | ||
466 | getLocalUrl (this: MAccountActor | MChannelActor) { | 463 | // Avoid error when running this method on MAccount... | MChannel... |
467 | return WEBSERVER.URL + `/accounts/` + this.Actor.preferredUsername | 464 | getClientUrl (this: MAccountHost | MChannelHost) { |
465 | return WEBSERVER.URL + '/a/' + this.Actor.getIdentifier() | ||
468 | } | 466 | } |
469 | 467 | ||
470 | isBlocked () { | 468 | isBlocked () { |