Remove "empty payload" toggle switch

This function is redundat, simply send an empty message wil suffice
This commit is contained in:
Thomas Nordquist
2019-01-20 12:54:54 +01:00
parent 4d794205d5
commit ab83c682ac
4 changed files with 5 additions and 41 deletions

View File

@@ -17,12 +17,6 @@ export const setPayload = (payload?: string): Action => {
}
}
export const toggleEmptyPayload = (): Action => {
return {
type: ActionTypes.PUBLISH_TOGGLE_EMPTY_PAYLOAD,
}
}
export const setQoS = (qos: 0 | 1 | 2): Action => {
return {
qos,
@@ -48,7 +42,7 @@ export const publish = (connectionId: string) => (dispatch: Dispatch<Action>, ge
const publishEvent = makePublishEvent(connectionId)
const mqttMessage = {
topic,
payload: state.publish.emptyPayload ? null : state.publish.payload,
payload: state.publish.payload,
retain: state.publish.retain,
qos: state.publish.qos,
}