Message history with delivery tracking
CI / build + unit (pull_request) Successful in 56s

This commit is contained in:
2026-09-24 14:13:16 +00:00
parent 5292303786
commit 044e630358
8 changed files with 325 additions and 6 deletions
+33
View File
@@ -107,6 +107,39 @@ export class MeshController {
return this.mesh.channels();
}
@Get('messages')
@ApiOperation({
summary: 'Message history (last 100)',
description:
'Inbound text messages and our sends, newest first. tx records start "pending" and move to "delivered"/"failed" when the routing ACK/NACK arrives; broadcasts stay "pending" because firmware strips want_ack before TX. History is in-memory only (last 100) and resets on every bridge reconnect.',
})
@ApiResponse({
status: 200,
description: 'Messages newest first',
example: [
{
id: 456789,
dir: 'tx',
to: 42,
text: 'hello testowy',
channel: 2,
at: 1758000123456,
status: 'delivered',
},
{
id: 123456,
dir: 'rx',
from: 987654321,
text: 'ping',
channel: 2,
at: 1758000000000,
},
],
})
messages() {
return this.mesh.messages();
}
@Get('nodes')
@ApiOperation({
summary: 'Known mesh nodes (lean summaries)',