summaryrefslogtreecommitdiff
path: root/src/server/api/stream/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/stream/index.ts')
-rw-r--r--src/server/api/stream/index.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/api/stream/index.ts b/src/server/api/stream/index.ts
index 36e08ec05f..5b975d07db 100644
--- a/src/server/api/stream/index.ts
+++ b/src/server/api/stream/index.ts
@@ -19,9 +19,9 @@ import { UserProfile } from '../../../models/entities/user-profile';
export default class Connection {
public user?: User;
public userProfile?: UserProfile;
- public following: User['id'][] = [];
- public muting: User['id'][] = [];
- public followingChannels: ChannelModel['id'][] = [];
+ public following: Set<User['id']> = new Set();
+ public muting: Set<User['id']> = new Set();
+ public followingChannels: Set<ChannelModel['id']> = new Set();
public token?: AccessToken;
private wsConnection: websocket.connection;
public subscriber: EventEmitter;
@@ -267,7 +267,7 @@ export default class Connection {
select: ['followeeId']
});
- this.following = followings.map(x => x.followeeId);
+ this.following = new Set<string>(followings.map(x => x.followeeId));
}
@autobind
@@ -279,7 +279,7 @@ export default class Connection {
select: ['muteeId']
});
- this.muting = mutings.map(x => x.muteeId);
+ this.muting = new Set<string>(mutings.map(x => x.muteeId));
}
@autobind
@@ -291,7 +291,7 @@ export default class Connection {
select: ['followeeId']
});
- this.followingChannels = followings.map(x => x.followeeId);
+ this.followingChannels = new Set<string>(followings.map(x => x.followeeId));
}
@autobind