Skip to content

Commit

Permalink
Fix sending onContact available notifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
caedesvvv committed Jan 28, 2015
1 parent f165140 commit 16430b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/backend/channels/catchan.js
Expand Up @@ -438,6 +438,7 @@ function (Bitcoin, Curve25519, Encryption, Protocol, Peer, ChannelUtils, Port) {
if ((!peer.sentBeacon || (Date.now()-peer.sentBeacon>10000)) && peer.contact && peer.contact.trust.trust > 1) {
// send beacon to contact
var idKey = peer.contact.findIdentityKey();
this.onContactAvailable(peer, peer.contact);
if (idKey) {
var keys = bufToArray(Bitcoin.base58check.decode(idKey.data.substr(3)).slice(1));
var beaconKey = keys.slice(0, 32);
Expand Down Expand Up @@ -499,7 +500,6 @@ function (Bitcoin, Curve25519, Encryption, Protocol, Peer, ChannelUtils, Port) {
self.acceptBeacon(decoded);
}
} else {
self.onContactAvailable(decoded.peer, contact);
enqueue = true;
}
} else {
Expand Down

0 comments on commit 16430b1

Please sign in to comment.