mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
chore: 🥹LocalMsg不会写入数据库
This commit is contained in:
parent
df081ef0cf
commit
950ddc749e
@ -158,7 +158,7 @@ export class NTEventWrapper {
|
|||||||
let retEvent: any = {};
|
let retEvent: any = {};
|
||||||
const databack = () => {
|
const databack = () => {
|
||||||
if (complete == 0) {
|
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 {
|
} else {
|
||||||
resolve([retEvent as Awaited<ReturnType<EventType>>, ...retData!]);
|
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 { friends, groups, selfInfo } from '@/core/data';
|
||||||
import { log, logWarn } from '@/common/utils/log';
|
import { log, logWarn } from '@/common/utils/log';
|
||||||
import { sleep } from '@/common/utils/helper';
|
import { sleep } from '@/common/utils/helper';
|
||||||
@ -41,7 +41,18 @@ setTimeout(() => {
|
|||||||
loadMessageUnique().then().catch();
|
loadMessageUnique().then().catch();
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 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 {
|
export class NTQQMsgApi {
|
||||||
// static napCatCore: NapCatCore | null = null;
|
// static napCatCore: NapCatCore | null = null;
|
||||||
// enum BaseEmojiType {
|
// enum BaseEmojiType {
|
||||||
|
@ -392,7 +392,7 @@ export interface MessageElement {
|
|||||||
avRecordElement?: AvRecordElement,
|
avRecordElement?: AvRecordElement,
|
||||||
structMsgElement?: null,
|
structMsgElement?: null,
|
||||||
faceBubbleElement?: FaceBubbleElement,
|
faceBubbleElement?: FaceBubbleElement,
|
||||||
shareLocationElement: ShareLocationElement,
|
shareLocationElement?: ShareLocationElement,
|
||||||
tofuRecordElement?: TofuRecordElement,
|
tofuRecordElement?: TofuRecordElement,
|
||||||
taskTopMsgElement?: TaskTopMsgElement,
|
taskTopMsgElement?: TaskTopMsgElement,
|
||||||
recommendedMsgElement?: RecommendedMsgElement,
|
recommendedMsgElement?: RecommendedMsgElement,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user