Add samePhoneResponsePrefix config option
Automatically prefixes responses with a configurable string when in
same-phone mode. This helps distinguish bot replies from user messages
in the same chat bubble.
Example config:
"samePhoneResponsePrefix": "🦞"
Will prefix all same-phone replies with the lobster emoji.
This commit is contained in:
@@ -594,6 +594,15 @@ export async function monitorWebProvider(
|
||||
);
|
||||
return;
|
||||
}
|
||||
// Apply same-phone response prefix if configured and in same-phone mode
|
||||
const samePhoneResponsePrefix = cfg.inbound?.samePhoneResponsePrefix;
|
||||
if (isSamePhoneMode && samePhoneResponsePrefix && replyResult.text) {
|
||||
// Only add prefix if not already present
|
||||
if (!replyResult.text.startsWith(samePhoneResponsePrefix)) {
|
||||
replyResult.text = `${samePhoneResponsePrefix} ${replyResult.text}`;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
await deliverWebReply({
|
||||
replyResult,
|
||||
|
||||
Reference in New Issue
Block a user