diff --git a/src/views/connections/ConnectionsDetail.vue b/src/views/connections/ConnectionsDetail.vue index 920c38ff6..d4d569a4e 100644 --- a/src/views/connections/ConnectionsDetail.vue +++ b/src/views/connections/ConnectionsDetail.vue @@ -1163,14 +1163,15 @@ export default class ConnectionsDetail extends Vue { this.stopTimedSend() return false } - const convertPayload = this.convertPayloadByScript(payload, 'received') - const sendPayload = this.convertPayloadByType(convertPayload, type, 'publish') const { isNewPayload } = await this.insertHistory( - { payload: sendPayload, payloadType: type } as HistoryMessagePayloadModel, + { payload, payloadType: type } as HistoryMessagePayloadModel, { qos, topic, retain } as HistoryMessageHeaderModel, ) // insert message into local storage + const convertPayload = this.convertPayloadByScript(payload, 'received') + const sendPayload = this.convertPayloadByType(convertPayload, type, 'publish') + this.client.publish!(topic, sendPayload, { qos, retain }, (error: Error) => { if (error) { const errorMsg = error.toString()