This commit is contained in:
手瓜一十雪
2024-07-31 21:46:12 +08:00
parent 78637751af
commit 126b54ad40
2 changed files with 3 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ export enum BuddyReqType {
KMEINITIATORWAITPEERCONFIRM
}
export interface FriendRequest {
isInitiator?: boolean;
isDecide: boolean;
friendUid: string;
reqType: BuddyReqType,

View File

@@ -241,7 +241,7 @@ export class NapCatOnebot11 {
msgListener.onMsgInfoListUpdate = (msgList) => {
this.postRecallMsg(msgList).then().catch(logError);
for (const msg of msgList.filter(e => e.senderUin == selfInfo.uin)) {
// console.log(msg);
// console.log(msg);
if (msg.sendStatus !== 2) {
//完成后再post
return;
@@ -594,7 +594,7 @@ export class NapCatOnebot11 {
async postFriendRequest(reqs: FriendRequest[]) {
for (const req of reqs) {
if (req.isDecide && req.reqType !== BuddyReqType.KMEINITIATORWAITPEERCONFIRM) {
if (!!req.isInitiator && req.isDecide && req.reqType !== BuddyReqType.KMEINITIATORWAITPEERCONFIRM) {
continue;
}
const friendRequestEvent = new OB11FriendRequestEvent();