From 9a3ecb2f91b0f7535ac6860f0d4530fa65140af6 Mon Sep 17 00:00:00 2001 From: Clansty Date: Fri, 23 Dec 2022 15:10:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20rand=20=E5=A4=AA=E9=95=BF=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=B6=88=E6=81=AF=E5=85=A5=E5=BA=93=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 2 +- src/services/DeleteMessageService.ts | 2 +- src/services/ForwardService.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 6f106a3..8d3d3ef 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -61,7 +61,7 @@ model Message { time Int brief String? seq Int - rand Int + rand BigInt @db.BigInt pktnum Int tgChatId BigInt @db.BigInt tgMsgId Int diff --git a/src/services/DeleteMessageService.ts b/src/services/DeleteMessageService.ts index 94452ae..3a3e488 100644 --- a/src/services/DeleteMessageService.ts +++ b/src/services/DeleteMessageService.ts @@ -53,7 +53,7 @@ export default class DeleteMessageService { }); if (messageInfo) { try { - this.recallQqMessage(pair.qq, messageInfo.seq, messageInfo.rand, + this.recallQqMessage(pair.qq, messageInfo.seq, Number(messageInfo.rand), pair.qq instanceof Friend ? messageInfo.time : messageInfo.pktnum, pair, isOthersMsg); await db.message.delete({ diff --git a/src/services/ForwardService.ts b/src/services/ForwardService.ts index fd2096f..935a559 100644 --- a/src/services/ForwardService.ts +++ b/src/services/ForwardService.ts @@ -416,7 +416,7 @@ export default class ForwardService { source = { message: quote.brief || ' ', seq: quote.seq, - rand: quote.rand, + rand: Number(quote.rand), user_id: Number(quote.qqSenderId), time: quote.time, };