diff --git a/__tests__/ExpensiMark-HTMLToText-test.js b/__tests__/ExpensiMark-HTMLToText-test.js
index 39f5bebc..6757803b 100644
--- a/__tests__/ExpensiMark-HTMLToText-test.js
+++ b/__tests__/ExpensiMark-HTMLToText-test.js
@@ -151,7 +151,7 @@ test('Mention user html to text', () => {
expect(parser.htmlToText(testString)).toBe('@Hidden');
const extras = {
- accountIdToName: {
+ accountIDToName: {
'1234': 'user@domain.com',
},
};
@@ -180,7 +180,7 @@ test('Mention report html to text', () => {
expect(parser.htmlToText(testString)).toBe('#Hidden');
const extras = {
- reportIdToName: {
+ reportIDToName: {
'1234': '#room-name',
},
};
diff --git a/__tests__/ExpensiMark-Markdown-test.js b/__tests__/ExpensiMark-Markdown-test.js
index 8f446820..a8bf1769 100644
--- a/__tests__/ExpensiMark-Markdown-test.js
+++ b/__tests__/ExpensiMark-Markdown-test.js
@@ -765,7 +765,7 @@ test('Mention user html to markdown', () => {
expect(parser.htmlToMarkdown(testString)).toBe('@Hidden');
const extras = {
- accountIdToName: {
+ accountIDToName: {
'1234': 'user@domain.com',
},
};
@@ -794,7 +794,7 @@ test('Mention report html to markdown', () => {
expect(parser.htmlToText(testString)).toBe('#Hidden');
const extras = {
- reportIdToName: {
+ reportIDToName: {
'1234': '#room-name',
},
};
diff --git a/lib/ExpensiMark.d.ts b/lib/ExpensiMark.d.ts
index f431df7e..fad8f1b6 100644
--- a/lib/ExpensiMark.d.ts
+++ b/lib/ExpensiMark.d.ts
@@ -35,7 +35,7 @@ declare type Rule = {
};
declare type ExtrasObject = {
- reportIdToName?: Record;
+ reportIDToName?: Record;
accountIDToName?: Record;
};
export default class ExpensiMark {
diff --git a/lib/ExpensiMark.js b/lib/ExpensiMark.js
index 3f4decb2..b72f2054 100644
--- a/lib/ExpensiMark.js
+++ b/lib/ExpensiMark.js
@@ -464,7 +464,7 @@ export default class ExpensiMark {
name: 'reportMentions',
regex: //gi,
replacement: (match, g1, offset, string, extras) => {
- const reportToNameMap = extras.reportIdToName;
+ const reportToNameMap = extras.reportIDToName;
if (!reportToNameMap || !reportToNameMap[g1]) {
Log.alert('[ExpensiMark] Missing report name', {reportID: g1});
return '#Hidden';
@@ -478,13 +478,13 @@ export default class ExpensiMark {
regex: /(?:)|(?:(.*?)<\/mention-user>)/gi,
replacement: (match, g1, g2, offset, string, extras) => {
if (g1) {
- const accountToNameMap = extras.accountIdToName;
+ const accountToNameMap = extras.accountIDToName;
if (!accountToNameMap || !accountToNameMap[g1]) {
Log.alert('[ExpensiMark] Missing account name', {accountID: g1});
return '@Hidden';
}
- return `@${extras.accountIdToName[g1]}`;
+ return `@${extras.accountIDToName[g1]}`;
}
return Str.removeSMSDomain(g2);
},
@@ -536,7 +536,7 @@ export default class ExpensiMark {
name: 'reportMentions',
regex: //gi,
replacement: (match, g1, offset, string, extras) => {
- const reportToNameMap = extras.reportIdToName;
+ const reportToNameMap = extras.reportIDToName;
if (!reportToNameMap || !reportToNameMap[g1]) {
Log.alert('[ExpensiMark] Missing report name', {reportID: g1});
return '#Hidden';
@@ -549,13 +549,12 @@ export default class ExpensiMark {
name: 'userMention',
regex: //gi,
replacement: (match, g1, offset, string, extras) => {
- const accountToNameMap = extras.accountIdToName;
+ const accountToNameMap = extras.accountIDToName;
if (!accountToNameMap || !accountToNameMap[g1]) {
Log.alert('[ExpensiMark] Missing account name', {accountID: g1});
return '@Hidden';
}
-
- return `@${extras.accountIdToName[g1]}`;
+ return `@${extras.accountIDToName[g1]}`;
},
},
{