fix private rover requests hopefully!

This commit is contained in:
legop3
2026-06-30 19:34:35 -04:00
parent d10a321759
commit 2eb6c00f9c
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
addition to roverd to make it possible to use a normal linux laptop + usb serial adapter as a rover, instead of a raspberry pi
addition to / variant of roverd to make it possible to use a normal linux laptop + usb serial adapter as a rover, instead of a raspberry pi
- USE THIS AS AN OPPURTINITY TO:
@@ -55,7 +55,6 @@ function pruneExpiredGrantsAndRefresh(reason = 'grant_expired') {
function listPendingForRequester(socket) {
const requesterKey = buildRequesterKey(socket);
const identity = getIdentitySummary(socket);
const pending = [];
for (const request of pendingRequests.values()) {
if (request.requesterKey !== requesterKey) continue;
@@ -321,6 +320,15 @@ function createRequest(socket, roverIdRaw) {
throw new Error(`Please wait ${remaining}s before sending another request`);
}
/*
Private rover requests are forwarded to lockdown admins through Discord, so
the request record should carry the canonical identity fields that admins
need for moderation and audit context. The requester key above decides
dedupe/cooldown behavior, while this summary keeps the human-facing payload
aligned with the newer identity service state on the socket.
*/
const identity = getIdentitySummary(socket);
const request = {
id: `prr_${crypto.randomBytes(8).toString('hex')}`,
status: 'pending',