Skip to content

Commit

Permalink
#789: resolving mobileKeyword in subscriptionKeyword.keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Mar 20, 2023
1 parent 95b27f2 commit 4c4b0a8
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions lib/metadataTypes/MobileMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,22 +245,31 @@ class MobileMessage extends MetadataType {
}): ${ex.message}.`
);
}

// mobileKeyword
if (metadata.keyword?.keyword) {
try {
try {
if (metadata.keyword?.keyword) {
cache.searchForField(
'mobileKeyword',
metadata.keyword.keyword,
'keyword',
'keyword'
);
} catch (ex) {
Util.logger.warn(
` - ${this.definition.type} ${metadata[this.definition.nameField]} (${
metadata[this.definition.keyField]
}): ${ex.message}.`
}
if (metadata.subscriptionKeyword?.keyword) {
cache.searchForField(
'mobileKeyword',
metadata.subscriptionKeyword.keyword,
'keyword',
'keyword'
);
}
} catch (ex) {
Util.logger.warn(
` - ${this.definition.type} ${metadata[this.definition.nameField]} (${
metadata[this.definition.keyField]
}): ${ex.message}.`
);
}

// extract text/code
Expand Down Expand Up @@ -293,6 +302,13 @@ class MobileMessage extends MetadataType {
if (metadata.keyword?.keyword) {
metadata.keyword = cache.getByKey('mobilekeyword', metadata.keyword.keyword);
}
if (metadata.subscriptionKeyword?.keyword) {
metadata.subscriptionKeyword.keyword = cache.getByKey(
'mobilekeyword',
metadata.subscriptionKeyword.keyword
);
}

// code
metadata.text = await this._mergeCode(metadata, deployDir);

Expand Down

0 comments on commit 4c4b0a8

Please sign in to comment.