trac-peer 0.1.34 → 0.1.35
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/package.json +1 -1
- package/src/index.js +3 -10
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -54,7 +54,7 @@ export class Peer extends ReadyResource {
|
|
|
54
54
|
this.connectedPeers = new Set();
|
|
55
55
|
this.options = options;
|
|
56
56
|
this.check = new Check();
|
|
57
|
-
this.dhtBootstrap = [
|
|
57
|
+
this.dhtBootstrap = ['116.202.214.143:10001','116.202.214.149:10001', 'node1.hyperdht.org:49737', 'node2.hyperdht.org:49737', 'node3.hyperdht.org:49737'];
|
|
58
58
|
this.dhtNode = null;
|
|
59
59
|
this.seen_auto_add = {};
|
|
60
60
|
this.validator = null;
|
|
@@ -410,19 +410,10 @@ export class Peer extends ReadyResource {
|
|
|
410
410
|
message.value.pin_id = pin_len;
|
|
411
411
|
await batch.put('pni/'+pin_len, { msg : op.value.dispatch.id, pinned : op.value.dispatch.pinned });
|
|
412
412
|
await batch.put('pnl', pin_len + 1);
|
|
413
|
-
|
|
414
|
-
console.log('new', await batch.get('pni/'+pin_len));
|
|
415
|
-
|
|
416
413
|
} else {
|
|
417
|
-
|
|
418
|
-
console.log('updated', await batch.get('pni/'+message.value.pin_id));
|
|
419
|
-
|
|
420
414
|
await batch.put('pni/'+message.value.pin_id, { msg : op.value.dispatch.id, pinned : op.value.dispatch.pinned });
|
|
421
415
|
}
|
|
422
416
|
message.value.pinned = op.value.dispatch.pinned;
|
|
423
|
-
|
|
424
|
-
console.log(message);
|
|
425
|
-
|
|
426
417
|
await batch.put('msg/'+op.value.dispatch.id, message.value);
|
|
427
418
|
await batch.put('sh/'+op.hash, '');
|
|
428
419
|
console.log(`Pinned message ${op.value.dispatch.id} by ${op.value.dispatch.address}`);
|
|
@@ -865,6 +856,8 @@ export class Peer extends ReadyResource {
|
|
|
865
856
|
await setNick(input, this);
|
|
866
857
|
} else if (input.startsWith('/mute_status')) {
|
|
867
858
|
await muteStatus(input, this);
|
|
859
|
+
} else if (input.startsWith('/pin_message')) {
|
|
860
|
+
await pinMessage(input, this);
|
|
868
861
|
} else if (input.startsWith('/set_mod')) {
|
|
869
862
|
await setMod(input, this);
|
|
870
863
|
} else if (input.startsWith('/delete_message')) {
|