Skip to content

Commit

Permalink
fix: agent note change of line
Browse files Browse the repository at this point in the history
  • Loading branch information
DaKingKong committed Dec 27, 2024
1 parent fe1f36f commit b79716d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/adapters/bullhorn/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,9 @@ function upsertCallAgentNote({ body, note }) {
if (!!!note) {
return body;
}
const noteRegex = RegExp('<br>(.+?)<br><br>');
const noteRegex = RegExp('<b>Agent notes</b><br>([\\s\\S]+?)<br><br>');
if (noteRegex.test(body)) {
body = body.replace(noteRegex, `<br>${note}<br><br>`);
body = body.replace(noteRegex, `<b>Agent notes</b><br>${note}<br><br>`);
}
else {
body += `<br>${note}<br><br>`;
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/clio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ function upsertCallAgentNote({ body, note }) {
if (!!!note) {
return body;
}
const noteRegex = RegExp('- Note: (.+?)\n');
const noteRegex = RegExp('- Note: ([\\s\\S]+?)\n');
if (noteRegex.test(body)) {
body = body.replace(noteRegex, `- Note: ${note}\n`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/insightly/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ function upsertCallAgentNote({ body, note }) {
if (!!!note) {
return body;
}
const noteRegex = RegExp('- Agent note: (.+?)\n');
const noteRegex = RegExp('- Agent note: ([\\s\\S]+?)\n');
if (noteRegex.test(body)) {
body = body.replace(noteRegex, `- Agent note: ${note}\n`);
}
Expand Down
4 changes: 2 additions & 2 deletions src/adapters/pipedrive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ function upsertCallAgentNote({ body, note }) {
if (!!!note) {
return body;
}
const noteRegex = RegExp('<br>(.+?)<br><br>');
const noteRegex = RegExp('<b>Agent notes</b><br>([\\s\\S]+?)<br><br>');
if (noteRegex.test(body)) {
body = body.replace(noteRegex, `<br>${note}<br><br>`);
body = body.replace(noteRegex, `<b>Agent notes</b><br>${note}<br><br>`);
}
else {
body += `<br>${note}<br><br>`;
Expand Down
4 changes: 2 additions & 2 deletions src/adapters/redtail/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@ function upsertCallAgentNote({ body, note }) {
if (!!!note) {
return body;
}
const noteRegex = RegExp('<br>(.+?)<br><br>');
const noteRegex = RegExp('<b>Agent notes</b><br>([\\s\\S]+?)<br><br>');
if (noteRegex.test(body)) {
body = body.replace(noteRegex, `<br>${note}<br><br>`);
body = body.replace(noteRegex, `<b>Agent notes</b><br>${note}<br><br>`);
}
else {
body += `<br>${note}<br><br>`;
Expand Down

0 comments on commit b79716d

Please sign in to comment.