rez_core 5.0.251 → 5.0.252
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/package.json
CHANGED
|
@@ -945,6 +945,19 @@ export class IntegrationService {
|
|
|
945
945
|
app_code: app_code,
|
|
946
946
|
};
|
|
947
947
|
|
|
948
|
+
const subjectPrefix = this.configService.get('SUBJECT_PREFIX');
|
|
949
|
+
const profile = this.configService.get('PROFILE');
|
|
950
|
+
|
|
951
|
+
if (subjectPrefix) {
|
|
952
|
+
const updatedSubject =
|
|
953
|
+
profile?.charAt(0).toUpperCase() +
|
|
954
|
+
profile?.slice(1) +
|
|
955
|
+
' : ' +
|
|
956
|
+
subject; // << use current subject
|
|
957
|
+
|
|
958
|
+
subject = updatedSubject;
|
|
959
|
+
}
|
|
960
|
+
|
|
948
961
|
// Handle multiple recipients by sending to each individually
|
|
949
962
|
if (Array.isArray(to)) {
|
|
950
963
|
const results: IntegrationResult[] = [];
|
|
@@ -968,8 +981,7 @@ export class IntegrationService {
|
|
|
968
981
|
let variables;
|
|
969
982
|
let richText;
|
|
970
983
|
let externalTemplateId: string | undefined = undefined;
|
|
971
|
-
|
|
972
|
-
const subjectPrefix = this.configService.get('SUBJECT_PREFIX');
|
|
984
|
+
|
|
973
985
|
if (templateId) {
|
|
974
986
|
const templateData = await this.processTemplate(
|
|
975
987
|
parseInt(templateId, 10),
|
|
@@ -984,16 +996,6 @@ export class IntegrationService {
|
|
|
984
996
|
subject = templateData.subject;
|
|
985
997
|
}
|
|
986
998
|
|
|
987
|
-
if (subjectPrefix) {
|
|
988
|
-
const updatedSubject =
|
|
989
|
-
profile?.charAt(0).toUpperCase() +
|
|
990
|
-
profile?.slice(1) +
|
|
991
|
-
' : ' +
|
|
992
|
-
subject; // << use current subject
|
|
993
|
-
|
|
994
|
-
subject = updatedSubject;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
999
|
// Merge config with enhanced parameters
|
|
998
1000
|
let finalConfig = {
|
|
999
1001
|
...hub.config_json,
|