Where
`onYoYoMessagePOST()` in `src/YoYoWiFiManager.cpp`:
```cpp
if (message["path"] == "/yoyo/broadcast") {
//TODO: request to broadcast a message from a peer - 404 unless YY_MODE_PEER_SERVER
request->send(404);
result = 404;
}
```
`broadcastMessage()`, which relays a message out to every peer:
```cpp
for (int i = 0; i < peerCount; i++) {
getPeerN(i, ipAddress, NULL);
if(message["method"] == "POST") POST(ipAddress -> toString().c_str(), message["path"], message["payload"]);
//TODO: consider the other method types
}
```
Problem
- `/yoyo/broadcast` is entirely unimplemented - always 404, regardless of mode.
- `broadcastMessage()` (used internally by `processBroadcastMessageList()` in `YY_MODE_PEER_SERVER`) only relays messages whose `method` is `"POST"` - GET/DELETE messages added to `broadcastMessageList` would silently never be relayed to peers.
Ask
- Implement the `/yoyo/broadcast` endpoint per its intended purpose (per the comment: allow a peer, not just the local device, to request a broadcast - 404 unless in `YY_MODE_PEER_SERVER`).
- Extend `broadcastMessage()` to relay GET/DELETE the same way it does POST, using the existing `GET()`/DELETE equivalents, or explicitly document that broadcast is POST-only if that's intentional.
Where
`onYoYoMessagePOST()` in `src/YoYoWiFiManager.cpp`:
```cpp
if (message["path"] == "/yoyo/broadcast") {
//TODO: request to broadcast a message from a peer - 404 unless YY_MODE_PEER_SERVER
request->send(404);
result = 404;
}
```
`broadcastMessage()`, which relays a message out to every peer:
```cpp
for (int i = 0; i < peerCount; i++) {
getPeerN(i, ipAddress, NULL);
if(message["method"] == "POST") POST(ipAddress -> toString().c_str(), message["path"], message["payload"]);
//TODO: consider the other method types
}
```
Problem
Ask