aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-26 14:46:15 +0200
committerChocobozzz <me@florianbigard.com>2022-07-27 13:52:13 +0200
commit927fa4b11f692174d6296aa096d7a74bacdeea8b (patch)
tree20866dda219bbb5504d5645a980565fbbc25398a /shared
parent0f58b11f5cace6e57cab5b4a18380eb297b43fe4 (diff)
downloadPeerTube-927fa4b11f692174d6296aa096d7a74bacdeea8b.tar.gz
PeerTube-927fa4b11f692174d6296aa096d7a74bacdeea8b.tar.zst
PeerTube-927fa4b11f692174d6296aa096d7a74bacdeea8b.zip
Add rejected state to follows
Prevent reprocessing already rejected follows
Diffstat (limited to 'shared')
-rw-r--r--shared/models/actors/follow.model.ts2
-rw-r--r--shared/server-commands/server/follows-command.ts8
2 files changed, 5 insertions, 5 deletions
diff --git a/shared/models/actors/follow.model.ts b/shared/models/actors/follow.model.ts
index 7de638cba..244d6d97e 100644
--- a/shared/models/actors/follow.model.ts
+++ b/shared/models/actors/follow.model.ts
@@ -1,6 +1,6 @@
1import { Actor } from './actor.model' 1import { Actor } from './actor.model'
2 2
3export type FollowState = 'pending' | 'accepted' 3export type FollowState = 'pending' | 'accepted' | 'rejected'
4 4
5export interface ActorFollow { 5export interface ActorFollow {
6 id: number 6 id: number
diff --git a/shared/server-commands/server/follows-command.ts b/shared/server-commands/server/follows-command.ts
index 01ef6f179..496e11df1 100644
--- a/shared/server-commands/server/follows-command.ts
+++ b/shared/server-commands/server/follows-command.ts
@@ -6,13 +6,13 @@ import { PeerTubeServer } from './server'
6export class FollowsCommand extends AbstractCommand { 6export class FollowsCommand extends AbstractCommand {
7 7
8 getFollowers (options: OverrideCommandOptions & { 8 getFollowers (options: OverrideCommandOptions & {
9 start: number 9 start?: number
10 count: number 10 count?: number
11 sort: string 11 sort?: string
12 search?: string 12 search?: string
13 actorType?: ActivityPubActorType 13 actorType?: ActivityPubActorType
14 state?: FollowState 14 state?: FollowState
15 }) { 15 } = {}) {
16 const path = '/api/v1/server/followers' 16 const path = '/api/v1/server/followers'
17 17
18 const query = pick(options, [ 'start', 'count', 'sort', 'search', 'state', 'actorType' ]) 18 const query = pick(options, [ 'start', 'count', 'sort', 'search', 'state', 'actorType' ])