mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 04:45:46 +00:00
chore: 🥹LocalMsg不会写入数据库
This commit is contained in:
parent
df081ef0cf
commit
950ddc749e
@ -158,7 +158,7 @@ export class NTEventWrapper {
|
||||
let retEvent: any = {};
|
||||
const databack = () => {
|
||||
if (complete == 0) {
|
||||
reject(new Error('NTEvent EventName:' + EventName + ' ListenerName:' + ListenerName + ' timeout'));
|
||||
reject(new Error('Timeout: NTEvent EventName:' + EventName + ' ListenerName:' + ListenerName + ' EventRet:\n' + JSON.stringify(retEvent, null, 4) + '\n'));
|
||||
} else {
|
||||
resolve([retEvent as Awaited<ReturnType<EventType>>, ...retData!]);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { GetFileListParam, Peer, RawMessage, SendMessageElement } from '@/core/entities';
|
||||
import { ElementType, GetFileListParam, MessageElement, Peer, RawMessage, SendMessageElement, SendMsgElementConstructor } from '@/core/entities';
|
||||
import { friends, groups, selfInfo } from '@/core/data';
|
||||
import { log, logWarn } from '@/common/utils/log';
|
||||
import { sleep } from '@/common/utils/helper';
|
||||
@ -41,7 +41,18 @@ setTimeout(() => {
|
||||
loadMessageUnique().then().catch();
|
||||
});
|
||||
}, 100);
|
||||
// setTimeout(async () => {
|
||||
// let ele: MessageElement = {extBufForUI: '0x' ,...SendMsgElementConstructor.text('测试消息')};
|
||||
// let MsgId = await NTQQMsgApi.getMsgUniqueEx();
|
||||
// let peer ={ chatType: 2, peerUid: '809079648', guildId: '' };
|
||||
// console.log(await napCatCore.session.getMsgService().addLocalRecordMsg(
|
||||
// peer,
|
||||
// MsgId,
|
||||
// ele, [], true
|
||||
// ));
|
||||
// console.log(await NTQQMsgApi.multiForwardMsg(peer,peer,[MsgId]));
|
||||
|
||||
// }, 25000)
|
||||
export class NTQQMsgApi {
|
||||
// static napCatCore: NapCatCore | null = null;
|
||||
// enum BaseEmojiType {
|
||||
@ -142,7 +153,7 @@ export class NTQQMsgApi {
|
||||
});
|
||||
return retMsg;
|
||||
}
|
||||
static async getMsgUniqueEx(){
|
||||
static async getMsgUniqueEx() {
|
||||
let msgId = await NTQQMsgApi.getMsgUnique(await NTQQMsgApi.getServerTime());
|
||||
return msgId;
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ export interface MessageElement {
|
||||
avRecordElement?: AvRecordElement,
|
||||
structMsgElement?: null,
|
||||
faceBubbleElement?: FaceBubbleElement,
|
||||
shareLocationElement: ShareLocationElement,
|
||||
shareLocationElement?: ShareLocationElement,
|
||||
tofuRecordElement?: TofuRecordElement,
|
||||
taskTopMsgElement?: TaskTopMsgElement,
|
||||
recommendedMsgElement?: RecommendedMsgElement,
|
||||
|
Loading…
Reference in New Issue
Block a user