Skip to content

Commit

Permalink
fix: 返回格式错误,转发
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-cn committed Jun 24, 2024
1 parent 7ed4fbc commit 03636e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/adapters/icqq/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default class IcqqAdapter extends Adapter<"icqq", Sendable> {
}
return Object.fromEntries(
Object.entries(result).filter(([_, value]) => {
return typeof value === "function";
return typeof value !== "function";
}),
) as OneBot.Payload<V>;
}
Expand Down
5 changes: 3 additions & 2 deletions src/adapters/icqq/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ export async function processMessages(
target_type: "group" | "private",
list: Sendable,
) {
if (!Array.isArray(list)) list = [list];
let result: MessageElem[] = [];
console.log(list);
for (const item of [].concat(list).filter(Boolean)) {
for (let item of [].concat(list).filter(Boolean)) {
if (typeof item === "string") item = { type: "text", text: item };
const { type, ...data } = item;
switch (type) {
case "node": {
Expand Down

0 comments on commit 03636e7

Please sign in to comment.