fix code quality issues
This commit is contained in:
parent
9ffa56aa1b
commit
b6f6c3ea18
27 changed files with 63 additions and 64 deletions
|
@ -9,9 +9,9 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class AdminChannel extends Channel {
|
||||
public readonly chName = 'admin';
|
||||
public static shouldShare = true;
|
||||
public static requireCredential = true as const;
|
||||
public static kind = 'read:admin:stream';
|
||||
public static readonly shouldShare = true;
|
||||
public static readonly requireCredential = true as const;
|
||||
public static readonly kind = 'read:admin:stream';
|
||||
|
||||
@bindThis
|
||||
public async init(params: any) {
|
||||
|
|
|
@ -12,9 +12,9 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class AntennaChannel extends Channel {
|
||||
public readonly chName = 'antenna';
|
||||
public static shouldShare = false;
|
||||
public static requireCredential = true as const;
|
||||
public static kind = 'read:account';
|
||||
public static readonly shouldShare = false;
|
||||
public static readonly requireCredential = true as const;
|
||||
public static readonly kind = 'read:account';
|
||||
private antennaId: string;
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -12,8 +12,8 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class ChannelChannel extends Channel {
|
||||
public readonly chName = 'channel';
|
||||
public static shouldShare = false;
|
||||
public static requireCredential = false as const;
|
||||
public static readonly shouldShare = false;
|
||||
public static readonly requireCredential = false as const;
|
||||
private channelId: string;
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -9,9 +9,9 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class DriveChannel extends Channel {
|
||||
public readonly chName = 'drive';
|
||||
public static shouldShare = true;
|
||||
public static requireCredential = true as const;
|
||||
public static kind = 'read:account';
|
||||
public static readonly shouldShare = true;
|
||||
public static readonly requireCredential = true as const;
|
||||
public static readonly kind = 'read:account';
|
||||
|
||||
@bindThis
|
||||
public async init(params: any) {
|
||||
|
|
|
@ -16,8 +16,8 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class GlobalTimelineChannel extends Channel {
|
||||
public readonly chName = 'globalTimeline';
|
||||
public static shouldShare = false;
|
||||
public static requireCredential = false as const;
|
||||
public static readonly shouldShare = false;
|
||||
public static readonly requireCredential = false as const;
|
||||
private withRenotes: boolean;
|
||||
private withFiles: boolean;
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class HashtagChannel extends Channel {
|
||||
public readonly chName = 'hashtag';
|
||||
public static shouldShare = false;
|
||||
public static requireCredential = false as const;
|
||||
public static readonly shouldShare = false;
|
||||
public static readonly requireCredential = false as const;
|
||||
private q: string[][];
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -14,9 +14,9 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class HomeTimelineChannel extends Channel {
|
||||
public readonly chName = 'homeTimeline';
|
||||
public static shouldShare = false;
|
||||
public static requireCredential = true as const;
|
||||
public static kind = 'read:account';
|
||||
public static readonly shouldShare = false;
|
||||
public static readonly requireCredential = true as const;
|
||||
public static readonly kind = 'read:account';
|
||||
private withRenotes: boolean;
|
||||
private withFiles: boolean;
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class HybridTimelineChannel extends Channel {
|
||||
public readonly chName = 'hybridTimeline';
|
||||
public static shouldShare = false;
|
||||
public static requireCredential = true as const;
|
||||
public static kind = 'read:account';
|
||||
public static readonly shouldShare = false;
|
||||
public static readonly requireCredential = true as const;
|
||||
public static readonly kind = 'read:account';
|
||||
private withRenotes: boolean;
|
||||
private withReplies: boolean;
|
||||
private withFiles: boolean;
|
||||
|
|
|
@ -15,8 +15,8 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class LocalTimelineChannel extends Channel {
|
||||
public readonly chName = 'localTimeline';
|
||||
public static shouldShare = false;
|
||||
public static requireCredential = false as const;
|
||||
public static readonly shouldShare = false;
|
||||
public static readonly requireCredential = false as const;
|
||||
private withRenotes: boolean;
|
||||
private withReplies: boolean;
|
||||
private withFiles: boolean;
|
||||
|
|
|
@ -11,9 +11,9 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class MainChannel extends Channel {
|
||||
public readonly chName = 'main';
|
||||
public static shouldShare = true;
|
||||
public static requireCredential = true as const;
|
||||
public static kind = 'read:account';
|
||||
public static readonly shouldShare = true;
|
||||
public static readonly requireCredential = true as const;
|
||||
public static readonly kind = 'read:account';
|
||||
|
||||
constructor(
|
||||
private noteEntityService: NoteEntityService,
|
||||
|
|
|
@ -12,8 +12,8 @@ const ev = new Xev();
|
|||
|
||||
class QueueStatsChannel extends Channel {
|
||||
public readonly chName = 'queueStats';
|
||||
public static shouldShare = true;
|
||||
public static requireCredential = false as const;
|
||||
public static readonly shouldShare = true;
|
||||
public static readonly requireCredential = false as const;
|
||||
|
||||
constructor(id: string, connection: Channel['connection']) {
|
||||
super(id, connection);
|
||||
|
|
|
@ -13,8 +13,8 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class ReversiGameChannel extends Channel {
|
||||
public readonly chName = 'reversiGame';
|
||||
public static shouldShare = false;
|
||||
public static requireCredential = false as const;
|
||||
public static readonly shouldShare = false;
|
||||
public static readonly requireCredential = false as const;
|
||||
private gameId: MiReversiGame['id'] | null = null;
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -9,9 +9,9 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class ReversiChannel extends Channel {
|
||||
public readonly chName = 'reversi';
|
||||
public static shouldShare = true;
|
||||
public static requireCredential = true as const;
|
||||
public static kind = 'read:account';
|
||||
public static readonly shouldShare = true;
|
||||
public static readonly requireCredential = true as const;
|
||||
public static readonly kind = 'read:account';
|
||||
|
||||
@bindThis
|
||||
public async init(params: any) {
|
||||
|
|
|
@ -14,8 +14,8 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class RoleTimelineChannel extends Channel {
|
||||
public readonly chName = 'roleTimeline';
|
||||
public static shouldShare = false;
|
||||
public static requireCredential = false as const;
|
||||
public static readonly shouldShare = false;
|
||||
public static readonly requireCredential = false as const;
|
||||
private roleId: string;
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -12,8 +12,8 @@ const ev = new Xev();
|
|||
|
||||
class ServerStatsChannel extends Channel {
|
||||
public readonly chName = 'serverStats';
|
||||
public static shouldShare = true;
|
||||
public static requireCredential = false as const;
|
||||
public static readonly shouldShare = true;
|
||||
public static readonly requireCredential = false as const;
|
||||
|
||||
constructor(id: string, connection: Channel['connection']) {
|
||||
super(id, connection);
|
||||
|
|
|
@ -15,8 +15,8 @@ import Channel, { type MiChannelService } from '../channel.js';
|
|||
|
||||
class UserListChannel extends Channel {
|
||||
public readonly chName = 'userList';
|
||||
public static shouldShare = false;
|
||||
public static requireCredential = false as const;
|
||||
public static readonly shouldShare = false;
|
||||
public static readonly requireCredential = false as const;
|
||||
private listId: string;
|
||||
private membershipsMap: Record<string, Pick<MiUserListMembership, 'withReplies'> | undefined> = {};
|
||||
private listUsersClock: NodeJS.Timeout;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue