feat: add beta googlechat channel
This commit is contained in:
committed by
Peter Steinberger
parent
60661441b1
commit
b76cd6695d
@@ -36,6 +36,9 @@ export function applyChannelAccountConfig(params: {
|
||||
httpHost?: string;
|
||||
httpPort?: string;
|
||||
webhookPath?: string;
|
||||
webhookUrl?: string;
|
||||
audienceType?: string;
|
||||
audience?: string;
|
||||
useEnv?: boolean;
|
||||
homeserver?: string;
|
||||
userId?: string;
|
||||
@@ -70,6 +73,9 @@ export function applyChannelAccountConfig(params: {
|
||||
httpHost: params.httpHost,
|
||||
httpPort: params.httpPort,
|
||||
webhookPath: params.webhookPath,
|
||||
webhookUrl: params.webhookUrl,
|
||||
audienceType: params.audienceType,
|
||||
audience: params.audience,
|
||||
useEnv: params.useEnv,
|
||||
homeserver: params.homeserver,
|
||||
userId: params.userId,
|
||||
|
||||
@@ -33,6 +33,9 @@ export type ChannelsAddOptions = {
|
||||
httpHost?: string;
|
||||
httpPort?: string;
|
||||
webhookPath?: string;
|
||||
webhookUrl?: string;
|
||||
audienceType?: string;
|
||||
audience?: string;
|
||||
useEnv?: boolean;
|
||||
homeserver?: string;
|
||||
userId?: string;
|
||||
@@ -198,6 +201,9 @@ export async function channelsAddCommand(
|
||||
httpHost: opts.httpHost,
|
||||
httpPort: opts.httpPort,
|
||||
webhookPath: opts.webhookPath,
|
||||
webhookUrl: opts.webhookUrl,
|
||||
audienceType: opts.audienceType,
|
||||
audience: opts.audience,
|
||||
homeserver: opts.homeserver,
|
||||
userId: opts.userId,
|
||||
accessToken: opts.accessToken,
|
||||
@@ -238,6 +244,9 @@ export async function channelsAddCommand(
|
||||
httpHost: opts.httpHost,
|
||||
httpPort: opts.httpPort,
|
||||
webhookPath: opts.webhookPath,
|
||||
webhookUrl: opts.webhookUrl,
|
||||
audienceType: opts.audienceType,
|
||||
audience: opts.audience,
|
||||
homeserver: opts.homeserver,
|
||||
userId: opts.userId,
|
||||
accessToken: opts.accessToken,
|
||||
|
||||
@@ -35,7 +35,11 @@ function detectAutoKind(input: string): ChannelResolveKind {
|
||||
if (!trimmed) return "group";
|
||||
if (trimmed.startsWith("@")) return "user";
|
||||
if (/^<@!?/.test(trimmed)) return "user";
|
||||
if (/^(user|discord|slack|matrix|msteams|teams|zalo|zalouser):/i.test(trimmed)) {
|
||||
if (
|
||||
/^(user|discord|slack|matrix|msteams|teams|zalo|zalouser|googlechat|google-chat|gchat):/i.test(
|
||||
trimmed,
|
||||
)
|
||||
) {
|
||||
return "user";
|
||||
}
|
||||
return "group";
|
||||
|
||||
Reference in New Issue
Block a user