chore: Run pnpm format:fix.

This commit is contained in:
cpojer
2026-01-31 21:13:13 +09:00
parent dcc2de15a6
commit 8cab78abbc
624 changed files with 10729 additions and 7514 deletions
+10 -29
View File
@@ -71,8 +71,7 @@ export async function handleNextcloudTalkInbound(params: {
roomToken: message.roomToken,
runtime,
});
const isGroup =
roomKind === "direct" ? false : roomKind === "group" ? true : message.isGroupChat;
const isGroup = roomKind === "direct" ? false : roomKind === "group" ? true : message.isGroupChat;
const senderId = message.senderId;
const senderName = message.senderName;
const roomToken = message.roomToken;
@@ -86,9 +85,7 @@ export async function handleNextcloudTalkInbound(params: {
const configAllowFrom = normalizeNextcloudTalkAllowlist(account.config.allowFrom);
const configGroupAllowFrom = normalizeNextcloudTalkAllowlist(account.config.groupAllowFrom);
const storeAllowFrom = await core.channel.pairing
.readAllowFromStore(CHANNEL_ID)
.catch(() => []);
const storeAllowFrom = await core.channel.pairing.readAllowFromStore(CHANNEL_ID).catch(() => []);
const storeAllowList = normalizeNextcloudTalkAllowlist(storeAllowFrom);
const roomMatch = resolveNextcloudTalkRoomMatch({
@@ -123,16 +120,12 @@ export async function handleNextcloudTalkInbound(params: {
senderId,
senderName,
}).allowed;
const hasControlCommand = core.channel.text.hasControlCommand(
rawBody,
config as OpenClawConfig,
);
const hasControlCommand = core.channel.text.hasControlCommand(rawBody, config as OpenClawConfig);
const commandGate = resolveControlCommandGate({
useAccessGroups,
authorizers: [
{
configured:
(isGroup ? effectiveGroupAllowFrom : effectiveAllowFrom).length > 0,
configured: (isGroup ? effectiveGroupAllowFrom : effectiveAllowFrom).length > 0,
allowed: senderAllowedForCommands,
},
],
@@ -150,9 +143,7 @@ export async function handleNextcloudTalkInbound(params: {
senderName,
});
if (!groupAllow.allowed) {
runtime.log?.(
`nextcloud-talk: drop group sender ${senderId} (policy=${groupPolicy})`,
);
runtime.log?.(`nextcloud-talk: drop group sender ${senderId} (policy=${groupPolicy})`);
return;
}
} else {
@@ -192,9 +183,7 @@ export async function handleNextcloudTalkInbound(params: {
}
}
}
runtime.log?.(
`nextcloud-talk: drop DM sender ${senderId} (dmPolicy=${dmPolicy})`,
);
runtime.log?.(`nextcloud-talk: drop DM sender ${senderId} (dmPolicy=${dmPolicy})`);
return;
}
}
@@ -210,9 +199,7 @@ export async function handleNextcloudTalkInbound(params: {
return;
}
const mentionRegexes = core.channel.mentions.buildMentionRegexes(
config as OpenClawConfig,
);
const mentionRegexes = core.channel.mentions.buildMentionRegexes(config as OpenClawConfig);
const wasMentioned = mentionRegexes.length
? core.channel.mentions.matchesMentionPatterns(rawBody, mentionRegexes)
: false;
@@ -245,15 +232,11 @@ export async function handleNextcloudTalkInbound(params: {
},
});
const fromLabel = isGroup
? `room:${roomName || roomToken}`
: senderName || `user:${senderId}`;
const fromLabel = isGroup ? `room:${roomName || roomToken}` : senderName || `user:${senderId}`;
const storePath = core.channel.session.resolveStorePath(config.session?.store, {
agentId: route.agentId,
});
const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(
config as OpenClawConfig,
);
const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(config as OpenClawConfig);
const previousTimestamp = core.channel.session.readSessionUpdatedAt({
storePath,
sessionKey: route.sessionKey,
@@ -320,9 +303,7 @@ export async function handleNextcloudTalkInbound(params: {
});
},
onError: (err, info) => {
runtime.error?.(
`nextcloud-talk ${info.kind} reply failed: ${String(err)}`,
);
runtime.error?.(`nextcloud-talk ${info.kind} reply failed: ${String(err)}`);
},
},
replyOptions: {