refactor: chattype

This commit is contained in:
手瓜一十雪 committed 2024-08-22 15:53:27 +08:00
1 parent b12ecfe225
commit f17d6abb74
21 files changed
+44 -53

No files matched your search

+3 -3
View File
@@ -20,15 +20,15 @@ async function handleMsg(coreContext: NapCatCore, obContext: NapCatOneBot11Adapt
msg = msg as OB11Message;
const reply = quickAction.reply;
const peer: Peer = {
chatType: ChatType.friend,
chatType: ChatType.KCHATTYPEC2C,
peerUid: await coreContext.apis.UserApi.getUidByUinV2(msg.user_id.toString()) as string,
};
if (msg.message_type == 'private') {
if (msg.sub_type === 'group') {
peer.chatType = ChatType.temp;
peer.chatType = ChatType.KCHATTYPETEMPC2CFROMGROUP;
}
} else {
peer.chatType = ChatType.group;
peer.chatType = ChatType.KCHATTYPETEMPC2CFROMGROUP;
peer.peerUid = msg.group_id!.toString();
}
if (reply) {