update conversation id

This commit is contained in:
Zhang Minghan 2023-10-06 17:28:52 +08:00
parent ef463d5976
commit aabb81109d
3 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import axios from "axios"; import axios from "axios";
export const version = "3.3.2"; export const version = "3.3.3";
export const deploy: boolean = true; export const deploy: boolean = true;
export let rest_api: string = "http://localhost:8094"; export let rest_api: string = "http://localhost:8094";
export let ws_api: string = "ws://localhost:8094"; export let ws_api: string = "ws://localhost:8094";

View File

@ -17,6 +17,7 @@ export class Conversation {
this.idx = -1; this.idx = -1;
this.id = id; this.id = id;
this.end = true; this.end = true;
this.connection = new Connection(this.id);
} }
public setId(id: number): void { public setId(id: number): void {

View File

@ -94,7 +94,6 @@ export class Manager {
); );
const target = await useHook(); const target = await useHook();
this.conversations[target] = this.conversations[-1]; this.conversations[target] = this.conversations[-1];
this.get(target)!.setId(target);
delete this.conversations[-1]; // fix pointer delete this.conversations[-1]; // fix pointer
this.conversations[-1] = this.createConversation(-1); this.conversations[-1] = this.createConversation(-1);
this.current = target; this.current = target;