fix 推送sid

This commit is contained in:
luying
2021-01-22 11:01:26 +08:00
parent 65320fb9e0
commit f8d7967e34
3 changed files with 4 additions and 8 deletions

View File

@@ -35,9 +35,8 @@ export class ChatRemote {
* @param {boolean} flag 是否创建新channel
*
*/
public async addWorldChannel(roleId: string, serverId: number, flag: boolean = true) {
public async addWorldChannel(roleId: string, serverId: number, sid: string, flag: boolean = true) {
const name = `world${serverId}`;
const sid = this.app.getServerId();
let channel = this.channelService.getChannel(name, flag);
let param = {
roleId
@@ -80,9 +79,8 @@ export class ChatRemote {
* @param {String} serverId 区id
*
*/
public async kickWorldChannel(roleId: string, serverId: number) {
public async kickWorldChannel(roleId: string, sid: string, serverId: number) {
const name = `world${serverId}`;
const sid = this.app.getServerId();
let channel = this.channelService.getChannel(name, false);
// leave channel