msg_id → msg_type

This commit is contained in:
Laura Klünder 2023-10-20 15:41:46 +02:00
parent 9bee0bf774
commit bf1834cd63
6 changed files with 50 additions and 46 deletions

View file

@ -69,7 +69,7 @@
{% else %}
{% for key, value in msg.data.items %}
{% if key != "src" and key != "dst" and key != "msg_id" %}
{% if key != "src" and key != "dst" and key != "msg_type" %}
<div class="mesh-msg-data mesh-msg-type-{{ key }}">
<strong>{{ key }}</strong>: {{ value }}
</div>

View file

@ -169,7 +169,7 @@ class MeshMessageSendingView(ControlPanelMixin, TemplateView):
**data,
"node_name": node_names.get(data["msg_data"].get("address"), ""),
"recipients": [(address, node_names[address]) for address in data["recipients"]],
"msg_type": MeshMessageType(data["msg_data"]["msg_id"]).name,
"msg_type": data["msg_data"]["msg_type"],
}