mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: send message
This commit is contained in:
parent
31f21176f7
commit
90eb3da7f8
@ -4,7 +4,8 @@ import {
|
||||
ElementType,
|
||||
NapCatCore,
|
||||
Peer,
|
||||
RawMessage, ReplyElement,
|
||||
RawMessage,
|
||||
ReplyElement,
|
||||
SendMessageElement,
|
||||
SendTextElement,
|
||||
} from '@/core';
|
||||
@ -232,7 +233,9 @@ export class LaanaMessageUtils {
|
||||
};
|
||||
|
||||
async laanaPeerToRaw(peer: LaanaPeer): Promise<Peer> {
|
||||
const peerUid = await this.core.apis.UserApi.getUidByUinV2(peer.uin);
|
||||
const peerUid = peer.type === Peer_Type.BUDDY ?
|
||||
await this.core.apis.UserApi.getUidByUinV2(peer.uin) :
|
||||
peer.uin;
|
||||
if (!peerUid) {
|
||||
throw Error('查询用户 UID 失败');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user