mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 19:18:26 +00:00
chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.
This commit is contained in:
@@ -16,7 +16,7 @@ export function registerSlackReactionEvents(params: { ctx: SlackMonitorContext }
|
||||
if (!item || item.type !== "message") return;
|
||||
|
||||
const channelInfo = item.channel ? await ctx.resolveChannelName(item.channel) : {};
|
||||
const channelType = channelInfo?.type as SlackMessageEvent["channel_type"];
|
||||
const channelType = channelInfo?.type;
|
||||
if (
|
||||
!ctx.isChannelAllowed({
|
||||
channelId: item.channel,
|
||||
|
||||
@@ -7,7 +7,6 @@ import { DEFAULT_GROUP_HISTORY_LIMIT } from "../../auto-reply/reply/history.js";
|
||||
import { mergeAllowlist, summarizeMapping } from "../../channels/allowlists/resolve-utils.js";
|
||||
import { loadConfig } from "../../config/config.js";
|
||||
import type { SessionScope } from "../../config/sessions.js";
|
||||
import type { DmPolicy, GroupPolicy } from "../../config/types.js";
|
||||
import { warn } from "../../globals.js";
|
||||
import { normalizeMainKey } from "../../routing/session-key.js";
|
||||
import type { RuntimeEnv } from "../../runtime.js";
|
||||
@@ -91,13 +90,13 @@ export async function monitorSlackProvider(opts: MonitorSlackOpts = {}) {
|
||||
const dmConfig = slackCfg.dm;
|
||||
|
||||
const dmEnabled = dmConfig?.enabled ?? true;
|
||||
const dmPolicy = (dmConfig?.policy ?? "pairing") as DmPolicy;
|
||||
const dmPolicy = dmConfig?.policy ?? "pairing";
|
||||
let allowFrom = dmConfig?.allowFrom;
|
||||
const groupDmEnabled = dmConfig?.groupEnabled ?? false;
|
||||
const groupDmChannels = dmConfig?.groupChannels;
|
||||
let channelsConfig = slackCfg.channels;
|
||||
const defaultGroupPolicy = cfg.channels?.defaults?.groupPolicy;
|
||||
const groupPolicy = (slackCfg.groupPolicy ?? defaultGroupPolicy ?? "open") as GroupPolicy;
|
||||
const groupPolicy = slackCfg.groupPolicy ?? defaultGroupPolicy ?? "open";
|
||||
if (
|
||||
slackCfg.groupPolicy === undefined &&
|
||||
slackCfg.channels === undefined &&
|
||||
|
||||
@@ -589,7 +589,7 @@ export function registerSlackMonitorSlashCommands(params: {
|
||||
await handleSlashCommand({
|
||||
command: commandPayload,
|
||||
ack: async () => {},
|
||||
respond: respondFn as SlackCommandMiddlewareArgs["respond"],
|
||||
respond: respondFn,
|
||||
prompt,
|
||||
commandArgs,
|
||||
commandDefinition: commandDefinition ?? undefined,
|
||||
|
||||
@@ -72,7 +72,7 @@ export function createSlackThreadTsResolver(params: {
|
||||
return;
|
||||
}
|
||||
while (cache.size > maxSize) {
|
||||
const oldestKey = cache.keys().next().value as string | undefined;
|
||||
const oldestKey = cache.keys().next().value;
|
||||
if (!oldestKey) break;
|
||||
cache.delete(oldestKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user