diff --git a/src/public/text-messages-embed.html b/src/public/text-messages-embed.html
index f00020c..eb00bbe 100644
--- a/src/public/text-messages-embed.html
+++ b/src/public/text-messages-embed.html
@@ -79,6 +79,7 @@
{{ moment(new Date(message.created_at)).fromNow() }}
+
• Gated by {{ getNodeName(message.gateway_id) }}
@@ -216,6 +217,7 @@
for(const message of messages){
await this.fetchNodeInfo(message.to);
await this.fetchNodeInfo(message.from);
+ await this.fetchNodeInfo(message.gateway_id);
}
} catch(e) {
@@ -264,6 +266,7 @@
for(const message of messages){
await this.fetchNodeInfo(message.to);
await this.fetchNodeInfo(message.from);
+ await this.fetchNodeInfo(message.gateway_id);
}
} catch(e) {
@@ -305,12 +308,15 @@
container.scrollTop = container.scrollHeight;
});
},
+ getNodeHexId(nodeId) {
+ return "!" + parseInt(nodeId).toString(16);
+ },
getNodeName(nodeId) {
// find node by id
const node = this.nodesById[nodeId];
if(!node){
- return "Unknown";
+ return this.getNodeHexId(nodeId);
}
return `[${node.short_name}] ${node.long_name}`;
@@ -320,7 +326,7 @@
return this.nodesById[nodeId]?.short_name?.substring(0, 4) ?? "?";
},
getNodeLongName(nodeId) {
- return this.nodesById[nodeId]?.long_name ?? "???";
+ return this.nodesById[nodeId]?.long_name ?? this.getNodeHexId(nodeId);
},
getNodeColour(nodeId) {
// convert node id to a hex colour