aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts')
-rw-r--r--client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts16
1 files changed, 3 insertions, 13 deletions
diff --git a/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts b/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts
index 01bb401fb..b71a3c485 100644
--- a/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts
+++ b/client/src/app/shared/shared-actor-image-edit/actor-avatar-edit.component.ts
@@ -75,19 +75,9 @@ export class ActorAvatarEditComponent implements OnInit {
75 return !!this.preview || this.actor.avatars.length !== 0 75 return !!this.preview || this.actor.avatars.length !== 0
76 } 76 }
77 77
78 isChannel () { 78 getActorType () {
79 return !!(this.actor as VideoChannel).ownerAccount 79 if ((this.actor as VideoChannel).ownerAccount) return 'channel'
80 }
81
82 getChannel (): VideoChannel {
83 if (this.isChannel()) return this.actor as VideoChannel
84
85 return undefined
86 }
87
88 getAccount (): Account {
89 if (this.isChannel()) return undefined
90 80
91 return this.actor as Account 81 return 'account'
92 } 82 }
93} 83}