Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Prevent remote subscribe on accounts

Chocobozzz5cea8f956721
diff --git a/client/src/app/shared/shared-user-subscription/subscribe-button.component.html b/client/src/app/shared/shared-user-subscription/subscribe-button.component.html
index 341b83a043..d1d551c18b 100644
--- a/client/src/app/shared/shared-user-subscription/subscribe-button.component.html
+++ b/client/src/app/shared/shared-user-subscription/subscribe-button.component.html
@@ -5,15 +5,16 @@
<ng-template #userLoggedOut>
<span [ngClass]="{ 'extra-text': isAtLeastOneChannelSubscribed }">
- <ng-container *ngIf="account; then multiple; else single"></ng-container>
- <ng-template i18n #single>Subscribe</ng-template>
- <ng-template #multiple>
+ <ng-container i18n *ngIf="isSingleSubscribe">Subscribe</ng-container>
+
+ <ng-container *ngIf="!isSingleSubscribe">
<span i18n>Subscribe to all channels</span>
<span *ngIf="isAtLeastOneChannelSubscribed">{{ subscribeStatus(true).length }}/{{ subscribed.size }}
<ng-container i18n>channels subscribed</ng-container>
</span>
- </ng-template>
+ </ng-container>
</span>
+
<span *ngIf="!isBigButton && displayFollowers && videoChannels.length > 1 && videoChannel.followersCount !== 0" class="followers-count">
{{ videoChannels[0].followersCount | myNumberFormatter }}
</span>
diff --git a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
index 2a57518240..4e15f7bc0b 100644
--- a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
+++ b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
@@ -76,6 +76,10 @@ export class SubscribeButtonComponent implements OnInit, OnChanges {
return this.isUserLoggedIn() && this.videoChannels.length > 1 && this.isAtLeastOneChannelSubscribed
}
+ get isSingleSubscribe () {
+ return !this.account
+ }
+
ngOnInit () {
this.loadSubscribedStatus()
}
@@ -168,7 +172,7 @@ export class SubscribeButtonComponent implements OnInit, OnChanges {
}
isRemoteSubscribeAvailable () {
- return !this.isUserLoggedIn()
+ return this.isSingleSubscribe && !this.isUserLoggedIn()
}
private getChannelHandler (videoChannel: VideoChannel) {