refactor: chattype

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

View File

@@ -156,7 +156,7 @@ export class NTQQMsgApi {
peerOpenId: "",
};
return this.context.session.getMsgService().prepareTempChat({
chatType: ChatType.temp,
chatType: ChatType.KCHATTYPETEMPC2CFROMGROUP,
peerUid: toUserUid,
peerNickname: nickname,
fromGroupCode: GroupCode,
@@ -171,7 +171,7 @@ export class NTQQMsgApi {
}
async sendMsg(peer: Peer, msgElements: SendMessageElement[], waitComplete = true, timeout = 10000) {
//唉? !我有个想法
if (peer.chatType === ChatType.temp && peer.guildId && peer.guildId !== '') {
if (peer.chatType === ChatType.KCHATTYPETEMPC2CFROMGROUP && peer.guildId && peer.guildId !== '') {
const member = await this.core.apis.GroupApi.getGroupMember(peer.guildId, peer.peerUid!);
if (member) {
await this.PrepareTempChat(peer.peerUid, peer.guildId, member.nick);