|
@@ -189,11 +189,15 @@ export class MessageAuditorService implements MessageAuditorServiceInterface {
|
|
// Notification message may have multiple nested data properties that maybe in string format
|
|
// Notification message may have multiple nested data properties that maybe in string format
|
|
private checkIfIsInPayloadDataFormat(payload: BaseMessage | any) {
|
|
private checkIfIsInPayloadDataFormat(payload: BaseMessage | any) {
|
|
let parsedData: any
|
|
let parsedData: any
|
|
- if (payload.data.data.data && typeof payload.data.data.data === 'string') {
|
|
|
|
- parsedData = JSON.parse(payload.data.data.data)
|
|
|
|
- // console.log(parsedData)
|
|
|
|
- payload.data.data.data = parsedData
|
|
|
|
- return payload
|
|
|
|
|
|
+ if(payload.data.data){
|
|
|
|
+ if (payload.data.data.data && typeof payload.data.data.data === 'string') {
|
|
|
|
+ parsedData = JSON.parse(payload.data.data.data)
|
|
|
|
+ // console.log(parsedData)
|
|
|
|
+ payload.data.data.data = parsedData
|
|
|
|
+ return payload
|
|
|
|
+ } else {
|
|
|
|
+ return payload
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
return payload
|
|
return payload
|
|
}
|
|
}
|