refactor: rename role.options -> role.policies
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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>;
|
||||
|
Reference in New Issue
Block a user