mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-14 14:48:17 +09:00
Fix bug and clean up
This commit is contained in:
parent
62d9e2a8a2
commit
4ab40d8c8b
@ -1,6 +1,5 @@
|
|||||||
import autobind from 'autobind-decorator';
|
import autobind from 'autobind-decorator';
|
||||||
import * as websocket from 'websocket';
|
import * as websocket from 'websocket';
|
||||||
import * as debug from 'debug';
|
|
||||||
|
|
||||||
import User, { IUser } from '../../../models/user';
|
import User, { IUser } from '../../../models/user';
|
||||||
import readNotification from '../common/read-notification';
|
import readNotification from '../common/read-notification';
|
||||||
@ -12,8 +11,6 @@ import Channel from './channel';
|
|||||||
import channels from './channels';
|
import channels from './channels';
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
|
|
||||||
const log = debug('misskey');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main stream connection
|
* Main stream connection
|
||||||
*/
|
*/
|
||||||
@ -147,7 +144,6 @@ export default class Connection {
|
|||||||
@autobind
|
@autobind
|
||||||
private onChannelConnectRequested(payload: any) {
|
private onChannelConnectRequested(payload: any) {
|
||||||
const { channel, id, params, pong } = payload;
|
const { channel, id, params, pong } = payload;
|
||||||
log(`CH CONNECT: ${id} ${channel} by @${this.user.username}`);
|
|
||||||
this.connectChannel(id, params, channel, pong);
|
this.connectChannel(id, params, channel, pong);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +153,6 @@ export default class Connection {
|
|||||||
@autobind
|
@autobind
|
||||||
private onChannelDisconnectRequested(payload: any) {
|
private onChannelDisconnectRequested(payload: any) {
|
||||||
const { id } = payload;
|
const { id } = payload;
|
||||||
log(`CH DISCONNECT: ${id} by @${this.user.username}`);
|
|
||||||
this.disconnectChannel(id);
|
this.disconnectChannel(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user