summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream/index.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-08-16 17:51:28 +0900
committerGitHub <noreply@github.com>2023-08-16 17:51:28 +0900
commit792622aeadf3e36d50cddec3c64b2ff0105ea927 (patch)
treec42a71da86be3c33e2752b4c673e280b1158e57b /packages/backend/src/server/api/stream/index.ts
parentbuild(deps): bump actions/setup-node from 3.7.0 to 3.8.0 (#11726) (diff)
downloadsharkey-792622aeadf3e36d50cddec3c64b2ff0105ea927.tar.gz
sharkey-792622aeadf3e36d50cddec3c64b2ff0105ea927.tar.bz2
sharkey-792622aeadf3e36d50cddec3c64b2ff0105ea927.zip
refactor: prefix Mi for all entities (#11719)
* wip * wip * wip * wip * Update RepositoryModule.ts * wip * wip * wip * Revert "wip" This reverts commit c1c13b37d2aaf3c65bc148212da302b0eb7868bf.
Diffstat (limited to 'packages/backend/src/server/api/stream/index.ts')
-rw-r--r--packages/backend/src/server/api/stream/index.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/backend/src/server/api/stream/index.ts b/packages/backend/src/server/api/stream/index.ts
index 62eaf1abc1..2991691151 100644
--- a/packages/backend/src/server/api/stream/index.ts
+++ b/packages/backend/src/server/api/stream/index.ts
@@ -4,14 +4,14 @@
*/
import * as WebSocket from 'ws';
-import type { User } from '@/models/entities/User.js';
-import type { AccessToken } from '@/models/entities/AccessToken.js';
+import type { MiUser } from '@/models/entities/User.js';
+import type { MiAccessToken } from '@/models/entities/AccessToken.js';
import type { Packed } from '@/misc/json-schema.js';
import type { NoteReadService } from '@/core/NoteReadService.js';
import type { NotificationService } from '@/core/NotificationService.js';
import { bindThis } from '@/decorators.js';
import { CacheService } from '@/core/CacheService.js';
-import { UserProfile } from '@/models/index.js';
+import { MiUserProfile } from '@/models/index.js';
import type { ChannelsService } from './ChannelsService.js';
import type { EventEmitter } from 'events';
import type Channel from './channel.js';
@@ -21,14 +21,14 @@ import type { StreamEventEmitter, StreamMessages } from './types.js';
* Main stream connection
*/
export default class Connection {
- public user?: User;
- public token?: AccessToken;
+ public user?: MiUser;
+ public token?: MiAccessToken;
private wsConnection: WebSocket.WebSocket;
public subscriber: StreamEventEmitter;
private channels: Channel[] = [];
private subscribingNotes: any = {};
private cachedNotes: Packed<'Note'>[] = [];
- public userProfile: UserProfile | null = null;
+ public userProfile: MiUserProfile | null = null;
public following: Set<string> = new Set();
public followingChannels: Set<string> = new Set();
public userIdsWhoMeMuting: Set<string> = new Set();
@@ -42,8 +42,8 @@ export default class Connection {
private notificationService: NotificationService,
private cacheService: CacheService,
- user: User | null | undefined,
- token: AccessToken | null | undefined,
+ user: MiUser | null | undefined,
+ token: MiAccessToken | null | undefined,
) {
if (user) this.user = user;
if (token) this.token = token;