This commit is contained in:
syuilo 2018-08-29 06:30:48 +09:00
parent c03b549b12
commit 8848574df0
2 changed files with 6 additions and 4 deletions

View file

@ -7,13 +7,14 @@ import config from './config';
import IModule from './module'; import IModule from './module';
import MessageLike from './message-like'; import MessageLike from './message-like';
import { FriendDoc } from './friend'; import { FriendDoc } from './friend';
import { User } from './misskey/user';
const ReconnectingWebSocket = require('../node_modules/reconnecting-websocket/dist/reconnecting-websocket-cjs.js'); const ReconnectingWebSocket = require('../node_modules/reconnecting-websocket/dist/reconnecting-websocket-cjs.js');
/** /**
* *
*/ */
export default class { export default class {
public account: any; public account: User;
/** /**
* *
@ -40,7 +41,7 @@ export default class 藍 {
public friends: loki.Collection<FriendDoc>; public friends: loki.Collection<FriendDoc>;
constructor(account: any, modules: IModule[]) { constructor(account: User, modules: IModule[]) {
this.account = account; this.account = account;
this.modules = modules; this.modules = modules;

View file

@ -10,6 +10,7 @@ import * as request from 'request-promise-native';
import Reversi, { Color } from 'misskey-reversi'; import Reversi, { Color } from 'misskey-reversi';
import config from '../../config'; import config from '../../config';
import serifs from '../../serifs'; import serifs from '../../serifs';
import { User } from '../../misskey/user';
const db = {}; const db = {};
@ -25,7 +26,7 @@ const titles = [
]; ];
class Session { class Session {
private account: any; private account: User;
private game: any; private game: any;
private form: any; private form: any;
private o: Reversi; private o: Reversi;
@ -41,7 +42,7 @@ class Session {
*/ */
private startedNote: any = null; private startedNote: any = null;
private get user(): any { private get user(): User {
return this.game.user1Id == this.account.id ? this.game.user2 : this.game.user1; return this.game.user1Id == this.account.id ? this.game.user2 : this.game.user1;
} }