From 88995e1314e1bc21a880f61908fa1809dd831909 Mon Sep 17 00:00:00 2001 From: idranme <96647698+idranme@users.noreply.github.com> Date: Sun, 24 Nov 2024 02:31:29 +0800 Subject: [PATCH] Update http.ts --- adapters/qq/src/http.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adapters/qq/src/http.ts b/adapters/qq/src/http.ts index bdd1dadf..f469e520 100644 --- a/adapters/qq/src/http.ts +++ b/adapters/qq/src/http.ts @@ -2,7 +2,7 @@ import { Adapter, Binary, Context, Schema, Universal } from '@satorijs/core' import { getPublicKeyAsync, signAsync, verifyAsync } from '@noble/ed25519' import { QQBot } from './bot' import { Opcode, Payload } from './types' -import { adaptSession, decodeUser } from './utils' +import { adaptSession } from './utils' import { IncomingHttpHeaders } from 'node:http' import { } from '@cordisjs/plugin-server' @@ -27,7 +27,7 @@ export class HttpServer extends Adapter const sig = await signAsync(new TextEncoder().encode(data), key) ctx.body = { plain_token: payload.d.plain_token, - signature: Binary.toHex(sig) + signature: Binary.toHex(sig), } } else if (payload.op === Opcode.DISPATCH) { // https://bot.q.qq.com/wiki/develop/api-v2/dev-prepare/interface-framework/sign.html @@ -51,7 +51,7 @@ export class HttpServer extends Adapter ctx.body = { d: {}, - op: Opcode.HTTP_CALLBACK_ACK + op: Opcode.HTTP_CALLBACK_ACK, } }) }