mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
fix private rover requests hopefully!
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user