WhatsApp/Signal/Formstack/admin updates
This commit is contained in:
parent
bcecf61a46
commit
d0cc5a21de
451 changed files with 16139 additions and 39623 deletions
29
packages/bridge-common/lib/config/signal.ts
Normal file
29
packages/bridge-common/lib/config/signal.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Signal configuration
|
||||
*
|
||||
* Environment variables:
|
||||
* - SIGNAL_AUTO_GROUP_NAME_TEMPLATE: Template for auto-created group names (default: "Support Request: {conversationId}")
|
||||
* Available placeholders: {conversationId}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the Signal auto-group name template from environment variable
|
||||
* Defaults to "Support Request: {conversationId}" if not set
|
||||
*/
|
||||
export function getSignalAutoGroupNameTemplate(): string {
|
||||
const template = process.env.SIGNAL_AUTO_GROUP_NAME_TEMPLATE;
|
||||
|
||||
if (!template) {
|
||||
return "Support Request: {conversationId}";
|
||||
}
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a Signal group name from the template and conversation ID
|
||||
*/
|
||||
export function buildSignalGroupName(conversationId: string): string {
|
||||
const template = getSignalAutoGroupNameTemplate();
|
||||
return template.replace('{conversationId}', conversationId);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue