mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix #186
This commit is contained in:
@@ -62,6 +62,7 @@ export enum BuddyReqType {
|
|||||||
KMEINITIATORWAITPEERCONFIRM
|
KMEINITIATORWAITPEERCONFIRM
|
||||||
}
|
}
|
||||||
export interface FriendRequest {
|
export interface FriendRequest {
|
||||||
|
isInitiator?: boolean;
|
||||||
isDecide: boolean;
|
isDecide: boolean;
|
||||||
friendUid: string;
|
friendUid: string;
|
||||||
reqType: BuddyReqType,
|
reqType: BuddyReqType,
|
||||||
|
@@ -241,7 +241,7 @@ export class NapCatOnebot11 {
|
|||||||
msgListener.onMsgInfoListUpdate = (msgList) => {
|
msgListener.onMsgInfoListUpdate = (msgList) => {
|
||||||
this.postRecallMsg(msgList).then().catch(logError);
|
this.postRecallMsg(msgList).then().catch(logError);
|
||||||
for (const msg of msgList.filter(e => e.senderUin == selfInfo.uin)) {
|
for (const msg of msgList.filter(e => e.senderUin == selfInfo.uin)) {
|
||||||
// console.log(msg);
|
// console.log(msg);
|
||||||
if (msg.sendStatus !== 2) {
|
if (msg.sendStatus !== 2) {
|
||||||
//完成后再post
|
//完成后再post
|
||||||
return;
|
return;
|
||||||
@@ -594,7 +594,7 @@ export class NapCatOnebot11 {
|
|||||||
|
|
||||||
async postFriendRequest(reqs: FriendRequest[]) {
|
async postFriendRequest(reqs: FriendRequest[]) {
|
||||||
for (const req of reqs) {
|
for (const req of reqs) {
|
||||||
if (req.isDecide && req.reqType !== BuddyReqType.KMEINITIATORWAITPEERCONFIRM) {
|
if (!!req.isInitiator && req.isDecide && req.reqType !== BuddyReqType.KMEINITIATORWAITPEERCONFIRM) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const friendRequestEvent = new OB11FriendRequestEvent();
|
const friendRequestEvent = new OB11FriendRequestEvent();
|
||||||
|
Reference in New Issue
Block a user