refactor: chattype

This commit is contained in:
手瓜一十雪
2024-08-22 15:53:27 +08:00
parent 90dddd10a9
commit e086b8707f
21 changed files with 44 additions and 53 deletions

View File

@@ -492,7 +492,7 @@ export class NapCatOneBot11Adapter {
if (!oriMessageId) {
continue;
}
if (message.chatType == ChatType.friend) {
if (message.chatType == ChatType.KCHATTYPEC2C) {
const friendRecallEvent = new OB11FriendRecallNoticeEvent(
this.core,
parseInt(message!.senderUin),
@@ -500,7 +500,7 @@ export class NapCatOneBot11Adapter {
);
this.networkManager.emitEvent(friendRecallEvent)
.catch(e => this.context.logger.logError('处理好友消息撤回失败', e));
} else if (message.chatType == ChatType.group) {
} else if (message.chatType == ChatType.KCHATTYPETEMPC2CFROMGROUP) {
let operatorId = message.senderUin;
for (const element of message.elements) {
const operatorUid = element.grayTipElement?.revokeElement.operatorUid;