expensify-common 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ExpensiMark.d.ts +1 -1
- package/dist/ExpensiMark.js +6 -6
- package/package.json +1 -1
package/dist/ExpensiMark.d.ts
CHANGED
package/dist/ExpensiMark.js
CHANGED
|
@@ -453,7 +453,7 @@ class ExpensiMark {
|
|
|
453
453
|
name: 'reportMentions',
|
|
454
454
|
regex: /<mention-report reportID="(\d+)" *\/>/gi,
|
|
455
455
|
replacement: (match, g1, offset, string, extras) => {
|
|
456
|
-
const reportToNameMap = extras.
|
|
456
|
+
const reportToNameMap = extras.reportIDToName;
|
|
457
457
|
if (!reportToNameMap || !reportToNameMap[g1]) {
|
|
458
458
|
Log_1.default.alert('[ExpensiMark] Missing report name', { reportID: g1 });
|
|
459
459
|
return '#Hidden';
|
|
@@ -466,12 +466,12 @@ class ExpensiMark {
|
|
|
466
466
|
regex: /(?:<mention-user accountID="(\d+)" *\/>)|(?:<mention-user>(.*?)<\/mention-user>)/gi,
|
|
467
467
|
replacement: (match, g1, g2, offset, string, extras) => {
|
|
468
468
|
if (g1) {
|
|
469
|
-
const accountToNameMap = extras.
|
|
469
|
+
const accountToNameMap = extras.accountIDToName;
|
|
470
470
|
if (!accountToNameMap || !accountToNameMap[g1]) {
|
|
471
471
|
Log_1.default.alert('[ExpensiMark] Missing account name', { accountID: g1 });
|
|
472
472
|
return '@Hidden';
|
|
473
473
|
}
|
|
474
|
-
return `@${extras.
|
|
474
|
+
return `@${extras.accountIDToName[g1]}`;
|
|
475
475
|
}
|
|
476
476
|
return str_1.default.removeSMSDomain(g2);
|
|
477
477
|
},
|
|
@@ -522,7 +522,7 @@ class ExpensiMark {
|
|
|
522
522
|
name: 'reportMentions',
|
|
523
523
|
regex: /<mention-report reportID="(\d+)" *\/>/gi,
|
|
524
524
|
replacement: (match, g1, offset, string, extras) => {
|
|
525
|
-
const reportToNameMap = extras.
|
|
525
|
+
const reportToNameMap = extras.reportIDToName;
|
|
526
526
|
if (!reportToNameMap || !reportToNameMap[g1]) {
|
|
527
527
|
Log_1.default.alert('[ExpensiMark] Missing report name', { reportID: g1 });
|
|
528
528
|
return '#Hidden';
|
|
@@ -534,12 +534,12 @@ class ExpensiMark {
|
|
|
534
534
|
name: 'userMention',
|
|
535
535
|
regex: /<mention-user accountID="(\d+)" *\/>/gi,
|
|
536
536
|
replacement: (match, g1, offset, string, extras) => {
|
|
537
|
-
const accountToNameMap = extras.
|
|
537
|
+
const accountToNameMap = extras.accountIDToName;
|
|
538
538
|
if (!accountToNameMap || !accountToNameMap[g1]) {
|
|
539
539
|
Log_1.default.alert('[ExpensiMark] Missing account name', { accountID: g1 });
|
|
540
540
|
return '@Hidden';
|
|
541
541
|
}
|
|
542
|
-
return `@${extras.
|
|
542
|
+
return `@${extras.accountIDToName[g1]}`;
|
|
543
543
|
},
|
|
544
544
|
},
|
|
545
545
|
{
|