trac-peer 0.1.65 → 0.1.66
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 +15 -9
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -718,20 +718,26 @@ export class Peer extends ReadyResource {
|
|
|
718
718
|
try{
|
|
719
719
|
if(true === _this.base.writable && msg.inviteMyKey !== undefined &&
|
|
720
720
|
msg.bootstrap === _this.bootstrap && b4a.toString(connection.publicKey, 'hex') === msg.to){
|
|
721
|
-
await _this.base.
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
721
|
+
const auto_add_writers = await _this.base.view.get('auto_add_writers');
|
|
722
|
+
if(auto_add_writers !== null && auto_add_writers.value === 'on') {
|
|
723
|
+
await _this.base.append({
|
|
724
|
+
type : 'autoAddWriter',
|
|
725
|
+
key : msg.inviteMyKey
|
|
726
|
+
});
|
|
727
|
+
}
|
|
725
728
|
}
|
|
726
729
|
}catch(e){}
|
|
727
730
|
}});
|
|
728
731
|
|
|
729
732
|
if(false === _this.base.writable){
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
733
|
+
const auto_add_writers = await _this.base.view.get('auto_add_writers');
|
|
734
|
+
if(auto_add_writers !== null && auto_add_writers.value === 'on') {
|
|
735
|
+
message.send({
|
|
736
|
+
inviteMyKey : _this.writerLocalKey,
|
|
737
|
+
bootstrap : _this.bootstrap,
|
|
738
|
+
to : b4a.toString(connection.remotePublicKey, 'hex')
|
|
739
|
+
});
|
|
740
|
+
}
|
|
735
741
|
}
|
|
736
742
|
|
|
737
743
|
const remotePublicKey = b4a.toString(connection.remotePublicKey, 'hex');
|