summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-01-15 20:52:53 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-01-15 20:52:53 +0900
commit81f11d8f860803cf01fbb2cfd106bd3344db98f2 (patch)
tree2d5c528a5e6a24e016c74d49a650e76096b6f935 /packages/backend/src/server/api/stream
parentロールの各オプションに優先度を設定できるように (diff)
downloadsharkey-81f11d8f860803cf01fbb2cfd106bd3344db98f2.tar.gz
sharkey-81f11d8f860803cf01fbb2cfd106bd3344db98f2.tar.bz2
sharkey-81f11d8f860803cf01fbb2cfd106bd3344db98f2.zip
refactor: rename role.options -> role.policies
Diffstat (limited to 'packages/backend/src/server/api/stream')
-rw-r--r--packages/backend/src/server/api/stream/channels/global-timeline.ts4
-rw-r--r--packages/backend/src/server/api/stream/channels/hybrid-timeline.ts4
-rw-r--r--packages/backend/src/server/api/stream/channels/local-timeline.ts4
-rw-r--r--packages/backend/src/server/api/stream/types.ts2
4 files changed, 7 insertions, 7 deletions
diff --git a/packages/backend/src/server/api/stream/channels/global-timeline.ts b/packages/backend/src/server/api/stream/channels/global-timeline.ts
index 185c813869..43d8907fc9 100644
--- a/packages/backend/src/server/api/stream/channels/global-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts
@@ -29,8 +29,8 @@ class GlobalTimelineChannel extends Channel {
@bindThis
public async init(params: any) {
- const role = await this.roleService.getUserRoleOptions(this.user ? this.user.id : null);
- if (!role.gtlAvailable) return;
+ const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null);
+ if (!policies.gtlAvailable) return;
// Subscribe events
this.subscriber.on('notesStream', this.onNote);
diff --git a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts
index a0f75f202c..340f677815 100644
--- a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts
@@ -30,8 +30,8 @@ class HybridTimelineChannel extends Channel {
@bindThis
public async init(params: any): Promise<void> {
- const role = await this.roleService.getUserRoleOptions(this.user ? this.user.id : null);
- if (!role.ltlAvailable) return;
+ const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null);
+ if (!policies.ltlAvailable) return;
// Subscribe events
this.subscriber.on('notesStream', this.onNote);
diff --git a/packages/backend/src/server/api/stream/channels/local-timeline.ts b/packages/backend/src/server/api/stream/channels/local-timeline.ts
index 7d76f42fe7..ea29e30d63 100644
--- a/packages/backend/src/server/api/stream/channels/local-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts
@@ -28,8 +28,8 @@ class LocalTimelineChannel extends Channel {
@bindThis
public async init(params: any) {
- const role = await this.roleService.getUserRoleOptions(this.user ? this.user.id : null);
- if (!role.ltlAvailable) return;
+ const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null);
+ if (!policies.ltlAvailable) return;
// Subscribe events
this.subscriber.on('notesStream', this.onNote);
diff --git a/packages/backend/src/server/api/stream/types.ts b/packages/backend/src/server/api/stream/types.ts
index 03837baefb..a442529bb3 100644
--- a/packages/backend/src/server/api/stream/types.ts
+++ b/packages/backend/src/server/api/stream/types.ts
@@ -30,7 +30,7 @@ export interface InternalStreamTypes {
remoteUserUpdated: Serialized<{ id: User['id']; }>;
follow: Serialized<{ followerId: User['id']; followeeId: User['id']; }>;
unfollow: Serialized<{ followerId: User['id']; followeeId: User['id']; }>;
- defaultRoleOverrideUpdated: Serialized<Role['options']>;
+ policiesUpdated: Serialized<Role['options']>;
roleCreated: Serialized<Role>;
roleDeleted: Serialized<Role>;
roleUpdated: Serialized<Role>;