Collect channel_id

This commit is contained in:
Anton Roslund 2025-08-13 21:50:50 +02:00
parent 2fd0e9c016
commit 0be80d4177
3 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE `nodes` ADD COLUMN `channel_id` VARCHAR(191) NULL;

View file

@ -57,6 +57,8 @@ model Node {
is_backbone Boolean? is_backbone Boolean?
max_hops Int? max_hops Int?
channel_id String?
created_at DateTime @default(now()) created_at DateTime @default(now())
updated_at DateTime @default(now()) @updatedAt updated_at DateTime @default(now()) @updatedAt

View file

@ -948,6 +948,7 @@ client.on("message", async (topic, message) => {
is_unmessagable: user.isUnmessagable, is_unmessagable: user.isUnmessagable,
ok_to_mqtt: isOkToMqtt, ok_to_mqtt: isOkToMqtt,
max_hops: envelope.packet.hopStart, max_hops: envelope.packet.hopStart,
channel_id: envelope.channelId,
firmware_version: '<2.5.0', firmware_version: '<2.5.0',
...(user.publicKey != '' && { ...(user.publicKey != '' && {
@ -967,6 +968,7 @@ client.on("message", async (topic, message) => {
is_unmessagable: user.isUnmessagable, is_unmessagable: user.isUnmessagable,
ok_to_mqtt: isOkToMqtt, ok_to_mqtt: isOkToMqtt,
max_hops: envelope.packet.hopStart, max_hops: envelope.packet.hopStart,
channel_id: envelope.channelId,
firmware_version: '<2.5.0', firmware_version: '<2.5.0',
...(user.publicKey != '' && { ...(user.publicKey != '' && {