Skip to content

Commit

Permalink
chore: 去掉无用注释
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Aug 24, 2024
1 parent 24564f4 commit 99ca79a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/onebot/action/msg/SendMsg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ async function createContext(coreContext: NapCatCore, payload: OB11PostSendMsg,
if (!Uid) throw '无法获取用户信息';
const isBuddy = await NTQQFriendApi.isBuddy(Uid);
if (!isBuddy) {
//筛选被动C2CGroup临时会话
const ret = await NTQQMsgApi.getTempChatInfo(ChatType.KCHATTYPETEMPC2CFROMGROUP, Uid);
if (ret.tmpChatInfo?.groupCode) {
return {
Expand All @@ -111,22 +110,19 @@ async function createContext(coreContext: NapCatCore, payload: OB11PostSendMsg,
guildId: '',
};
}
//带有group_id的C2CGroup主动临时会话
if (payload.group_id) {
return {
chatType: ChatType.KCHATTYPETEMPC2CFROMGROUP,
peerUid: Uid,
guildId: payload.group_id.toString(),
};
}
//非好友的C2C 用于识别单向会话
return {
chatType: ChatType.KCHATTYPEC2C,
peerUid: Uid!,
guildId: payload.group_id?.toString() || '',
guildId: '',
};
}
//好友的C2C
return {
chatType: ChatType.KCHATTYPEC2C,
peerUid: Uid!,
Expand Down

0 comments on commit 99ca79a

Please sign in to comment.