fix: 对齐 OneBot schema 与合并转发消息处理行为 (#1694)
* fix: make defaulted request fields optional * fix: align onebot schemas with runtime behavior * fix: tighten schema and unsupported action metadata * fix: reject empty forward reference ids * fix: update GoCQHTTPSendForwardMsg to handle messages correctly and adjust payload schema * fix: refactor message handling in GoCQHTTPSendForwardMsg and add test for message normalization * fix: update compatibility actions to return appropriate responses and align schemas with runtime behavior * fix: ensure payload properties are non-null with default values in action handlers * fix: update StreamStatus comments for clarity and enforce nickname as required in message schema * fix: integrate sleep function in GetOnlineClient and update tests to verify API call * fix: add production test checklist for OneBot schema alignment and message handling * fix: remove outdated production test checklist for OneBot schema alignment
This commit is contained in:
54 files changed
+1078
-195
No files matched your search
@@ -31,8 +31,7 @@ export default class SetGroupAddRequest extends OneBotAction<PayloadType, Return
|
||||
async _handle (payload: PayloadType): Promise<null> {
|
||||
const flag = payload.flag.toString();
|
||||
const approve = payload.approve?.toString() !== 'false';
|
||||
const reason = payload.reason ?? ' ';
|
||||
const count = payload.count;
|
||||
const count = payload.count!;
|
||||
const invite_notify = this.obContext.apis.MsgApi.notifyGroupInvite.get(flag);
|
||||
const { doubt, notify } = invite_notify
|
||||
? {
|
||||
@@ -47,12 +46,12 @@ export default class SetGroupAddRequest extends OneBotAction<PayloadType, Return
|
||||
doubt,
|
||||
notify,
|
||||
approve ? NTGroupRequestOperateTypes.KAGREE : NTGroupRequestOperateTypes.KREFUSE,
|
||||
reason
|
||||
payload.reason ?? undefined
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
private async findNotify (flag: string, count: number = 100): Promise<{
|
||||
private async findNotify (flag: string, count: number): Promise<{
|
||||
doubt: boolean,
|
||||
notify: GroupNotify | undefined;
|
||||
}> {
|
||||
|
||||
Reference in new issue
Block a user