@decentnetwork/peer 0.1.30 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/peer.js +12 -1
- package/package.json +1 -1
package/dist/peer.js
CHANGED
|
@@ -586,7 +586,18 @@ export class Peer {
|
|
|
586
586
|
const routes = await this.#discoverFriendRoutes(friendAddress.publicKey);
|
|
587
587
|
this.#debugLog(`friend route discovery done routes=${routes.length}`);
|
|
588
588
|
if (routes.length === 0) {
|
|
589
|
-
|
|
589
|
+
// The direct net_crypto send needs a known endpoint for the target; to
|
|
590
|
+
// a peer we've never connected to (a dora, an exit) it throws. The old
|
|
591
|
+
// code `await`ed it bare, so that throw skipped the express push below
|
|
592
|
+
// and the friend-request never went out by ANY channel — the exact
|
|
593
|
+
// reason callpass never reached dora-mac. Make it best-effort so the
|
|
594
|
+
// express fallback always runs.
|
|
595
|
+
try {
|
|
596
|
+
await this.#sendDirectCryptoFriendRequest(friendAddress.publicKey, friendReqPayload);
|
|
597
|
+
}
|
|
598
|
+
catch (error) {
|
|
599
|
+
this.#debugLog(`direct crypto friend-request to ${friendId} failed: ${error.message}`);
|
|
600
|
+
}
|
|
590
601
|
this.#lastFriendRequestDispatch = {
|
|
591
602
|
transport: "direct",
|
|
592
603
|
routes: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decentnetwork/peer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"description": "Pure TypeScript port of Elastos Carrier (toxcore-derived) P2P messaging. DHT, onion routing, TCP relay, FlatBuffers app payloads, Express offline relay. Wire-compatible with iOS Beagle and the Carrier C SDK.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|