fix(onebot): support custom nested forward previews (#493)
Accept custom preview metadata on nested forward messages and carry it through card creation. Refs #493
This commit is contained in:
1 parent
1919e16081
commit
89275ae279
5 files changed
+208
-5
No files matched your search
@@ -255,6 +255,22 @@ export interface ForwardNodePayload {
|
||||
// Caller never sets this on top-level OneBot input — `parseForward
|
||||
// Nodes` synthesises it when it detects a nested-node array.
|
||||
innerForward?: ForwardNodePayload[];
|
||||
// Optional preview news lines carried on this node (OneBot
|
||||
// `data.news`, `Array<{ text: string }>`). When this node embeds a
|
||||
// nested forward (`innerForward`), the upload pipeline prefers these
|
||||
// lines over auto-generated ones for the inner forward's bubble
|
||||
// preview, matching NapCat / LLOneBot behaviour.
|
||||
news?: Array<{ text: string }>;
|
||||
// Optional bubble-preview metadata carried on this node (OneBot
|
||||
// `data.title` / `data.source` / `data.summary` / `data.prompt`).
|
||||
// When this node embeds a nested forward, the upload pipeline uses
|
||||
// these to label the inner forward's card (source line, summary,
|
||||
// prompt) instead of deriving them from the inner nodes. title is
|
||||
// exposed back through get_forward_msg for OneBot compatibility.
|
||||
title?: string;
|
||||
source?: string;
|
||||
summary?: string;
|
||||
prompt?: string;
|
||||
}
|
||||
|
||||
export interface QQEvent {
|
||||
|
||||
Reference in new issue
Block a user