feat: support mini app sign

This commit is contained in:
手瓜一十雪
2024-05-24 23:24:10 +08:00
parent e7de672c36
commit 4ab5fb3959
6 changed files with 47 additions and 25 deletions

View File

@@ -3,7 +3,7 @@ import { OB11GroupMember } from '../../types';
import { OB11Constructor } from '../../constructor';
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
import { napCatCore, NTQQGroupApi, NTQQUserApi } from '@/core';
import { napCatCore, NTQQGroupApi, NTQQUserApi, SignMiniApp } from '@/core';
import { WebApi } from '@/core/apis/webapi';
import { logDebug } from '@/common/utils/log';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';

View File

@@ -5,6 +5,7 @@ import {
Group,
IdMusicSignPostData,
NTQQFileApi,
SendArkElement,
SendMessageElement,
SendMsgElementConstructor
} from '@/core';
@@ -132,7 +133,8 @@ const _handlers: {
return SendMsgElementConstructor.video(path, fileName, thumb);
},
[OB11MessageDataType.miniapp]: async ({ data: any }) => (await SendMsgElementConstructor.miniapp()) as SendArkElement,
[OB11MessageDataType.voice]: async (sendMsg, context) =>
SendMsgElementConstructor.ptt((await handleOb11FileLikeMessage(sendMsg, context)).path),

View File

@@ -58,7 +58,8 @@ export enum OB11MessageDataType {
xml = 'xml',
poke = 'poke',
dice = 'dice',
RPS = 'rps'
RPS = 'rps',
miniapp = 'miniapp'//json类
}
export interface OB11MessageMFace {