mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 17:01:53 +03:00
chore: Run pnpm format:fix.
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user