Skip to content

Commit

Permalink
fix(connections): fix can't send hex & base64 payload on histroy
Browse files Browse the repository at this point in the history
  • Loading branch information
ysfscream committed Jun 5, 2021
1 parent 2dfc91d commit a9b378b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/views/connections/ConnectionsDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a9b378b

Please sign in to comment.