Phase 0 + Review

This commit is contained in:
Tyler Yust
2026-01-19 18:06:30 -08:00
committed by Peter Steinberger
parent 627fa3083b
commit ac2fcfe96a
12 changed files with 459 additions and 2 deletions

View File

@@ -183,3 +183,12 @@ export function resolveSlackGroupRequireMention(params: GroupMentionParams): boo
}
return true;
}
export function resolveBlueBubblesGroupRequireMention(params: GroupMentionParams): boolean {
return resolveChannelGroupRequireMention({
cfg: params.cfg,
channel: "bluebubbles",
groupId: params.groupId,
accountId: params.accountId,
});
}

View File

@@ -31,6 +31,7 @@ export type ChannelSetupInput = {
httpUrl?: string;
httpHost?: string;
httpPort?: string;
webhookPath?: string;
useEnv?: boolean;
homeserver?: string;
userId?: string;

View File

@@ -34,6 +34,7 @@ const optionNamesAdd = [
"httpUrl",
"httpHost",
"httpPort",
"webhookPath",
"useEnv",
"homeserver",
"userId",
@@ -163,6 +164,7 @@ export function registerChannelsCli(program: Command) {
.option("--http-url <url>", "Signal HTTP daemon base URL")
.option("--http-host <host>", "Signal HTTP host")
.option("--http-port <port>", "Signal HTTP port")
.option("--webhook-path <path>", "BlueBubbles webhook path")
.option("--homeserver <url>", "Matrix homeserver URL")
.option("--user-id <id>", "Matrix user ID")
.option("--access-token <token>", "Matrix access token")

View File

@@ -35,6 +35,7 @@ export function applyChannelAccountConfig(params: {
httpUrl?: string;
httpHost?: string;
httpPort?: string;
webhookPath?: string;
useEnv?: boolean;
homeserver?: string;
userId?: string;
@@ -62,6 +63,7 @@ export function applyChannelAccountConfig(params: {
httpUrl: params.httpUrl,
httpHost: params.httpHost,
httpPort: params.httpPort,
webhookPath: params.webhookPath,
useEnv: params.useEnv,
homeserver: params.homeserver,
userId: params.userId,

View File

@@ -26,6 +26,7 @@ export type ChannelsAddOptions = {
httpUrl?: string;
httpHost?: string;
httpPort?: string;
webhookPath?: string;
useEnv?: boolean;
homeserver?: string;
userId?: string;
@@ -139,6 +140,7 @@ export async function channelsAddCommand(
httpUrl: opts.httpUrl,
httpHost: opts.httpHost,
httpPort: opts.httpPort,
webhookPath: opts.webhookPath,
homeserver: opts.homeserver,
userId: opts.userId,
accessToken: opts.accessToken,
@@ -172,6 +174,7 @@ export async function channelsAddCommand(
httpUrl: opts.httpUrl,
httpHost: opts.httpHost,
httpPort: opts.httpPort,
webhookPath: opts.webhookPath,
homeserver: opts.homeserver,
userId: opts.userId,
accessToken: opts.accessToken,

View File

@@ -1,7 +1,7 @@
import { normalizeAccountId } from "../routing/session-key.js";
import type { ClawdbotConfig } from "./config.js";
export type GroupPolicyChannel = "whatsapp" | "telegram" | "imessage";
export type GroupPolicyChannel = "whatsapp" | "telegram" | "imessage" | "bluebubbles";
export type ChannelGroupConfig = {
requireMention?: boolean;

View File

@@ -107,6 +107,7 @@ export { resolveChannelMediaMaxBytes } from "../channels/plugins/media-limits.js
export type { NormalizedLocation } from "../channels/location.js";
export { formatLocationText, toLocationContext } from "../channels/location.js";
export {
resolveBlueBubblesGroupRequireMention,
resolveDiscordGroupRequireMention,
resolveIMessageGroupRequireMention,
resolveSlackGroupRequireMention,