This commit is contained in:
1-6
2023-07-27 00:24:47 +08:00
parent 63365c1506
commit 615e543845
12 changed files with 204 additions and 244 deletions
+4 -2
View File
@@ -237,8 +237,8 @@ class Sender {
call.cancel();
return;
}
let s = new Sender(response.uuid);
if (options?.handle) {
let s = response.uuid ? new Sender(response.uuid) : undefined;
if (options?.handle && s) {
// console.log(`options?.handle`, options.persistent)
let obj = options?.handle(s);
if (typeof obj == "string") {
@@ -538,7 +538,9 @@ class Adapter {
this.bot_id = options.bot_id;
if (options.replyHandler) {
const call = client.AdapterRegist();
// let callback: any = ;
call.on("data", async (response) => {
// console.log("start on data")
let message = JSON.parse(response.value);
const { echo, __type__ } = message;
delete message.__type__;