整理した
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import * as websocket from 'websocket';
|
||||
import * as redis from 'redis';
|
||||
import * as CRC32 from 'crc-32';
|
||||
import OthelloGame, { pack } from '../models/othello-game';
|
||||
import OthelloGame, { pack } from '../../../models/othello-game';
|
||||
import { publishOthelloGameStream } from '../event';
|
||||
import Othello from '../../common/othello/core';
|
||||
import * as maps from '../../common/othello/maps';
|
||||
import Othello from '../../../common/othello/core';
|
||||
import * as maps from '../../../common/othello/maps';
|
||||
import { ParsedUrlQuery } from 'querystring';
|
||||
|
||||
export default function(request: websocket.request, connection: websocket.connection, subscriber: redis.RedisClient, user?: any): void {
|
||||
const gameId = request.resourceURL.query.game;
|
||||
const q = request.resourceURL.query as ParsedUrlQuery;
|
||||
const gameId = q.game;
|
||||
|
||||
// Subscribe game stream
|
||||
subscriber.subscribe(`misskey:othello-game-stream:${gameId}`);
|
||||
|
Reference in New Issue
Block a user