fix: use device id for mqtt parent message
This commit is contained in:
@@ -337,14 +337,14 @@ class TalkingQMQTTService:
|
||||
params = payload.get("params", {})
|
||||
nfc_uuid = str(params.get("uuid") or "").strip()
|
||||
logger.info(device_id, "", f"[短按留言] 设备 {device_id} 短按发送留言, UUID={nfc_uuid}")
|
||||
if nfc_uuid == settings.talkingq_parent_message_uuid:
|
||||
if nfc_uuid == device_id:
|
||||
await device_target_cache.set_parent_target(device_id, nfc_uuid)
|
||||
response_payload = {
|
||||
"msg_id": "011",
|
||||
"status": "success",
|
||||
"type": 0,
|
||||
"params": {
|
||||
"url": "http://101.35.224.118:8080/assets/audio/message_ok.mp3"
|
||||
"url": "http://101.35.224.118:8080/assets/audio/parent_online_zh.mp3"
|
||||
},
|
||||
}
|
||||
await self._publish(f"device/{device_id}/event_resp", response_payload)
|
||||
@@ -371,7 +371,7 @@ class TalkingQMQTTService:
|
||||
"status": "success",
|
||||
"type": 0,
|
||||
"params": {
|
||||
"url": "http://101.35.224.118:8080/assets/audio/message_ok.mp3"
|
||||
"url": "http://101.35.224.118:8080/assets/audio/parent_online_zh.mp3"
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user