Socket
Socket
Sign inDemoInstall

ssb-conn

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssb-conn - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

18

lib/conn-scheduler.js

@@ -108,10 +108,12 @@ "use strict";

this.hops = {};
this.ssb.post((msg) => {
if (msg.value.author != this.ssb.id) {
this.lastMessageAt = Date.now();
}
if (msg.value.content && msg.value.content.type === 'contact') {
this.updateHops();
}
});
if (this.ssb.post) {
this.ssb.post((msg) => {
if (msg.value.author != this.ssb.id) {
this.lastMessageAt = Date.now();
}
if (msg.value.content && msg.value.content.type === 'contact') {
this.updateHops();
}
});
}
}

@@ -118,0 +120,0 @@ updateHops() {

{
"name": "ssb-conn",
"description": "SSB plugin for establishing and managing peer connections",
"version": "0.2.1",
"version": "0.2.2",
"homepage": "https://github.com/staltz/ssb-conn",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -103,10 +103,13 @@ import ConnHub = require('ssb-conn-hub');

this.ssb.post((msg: Msg) => {
if (msg.value.author != this.ssb.id) {
this.lastMessageAt = Date.now();
}
if (msg.value.content && msg.value.content.type === 'contact') {
this.updateHops();
}
});
// if ssb-db is installed
if (this.ssb.post) {
this.ssb.post((msg: Msg) => {
if (msg.value.author != this.ssb.id) {
this.lastMessageAt = Date.now();
}
if (msg.value.content && msg.value.content.type === 'contact') {
this.updateHops();
}
});
}
}

@@ -113,0 +116,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc