Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
fix: pubsub message fields (#627)
Browse files Browse the repository at this point in the history
* fix(pubsub): rename topicCIDs to topicIDs

* chore: update interface-ipfs-core
  • Loading branch information
richardschneider authored and daviddias committed Nov 16, 2017
1 parent 8852f69 commit 470777d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"dirty-chai": "^2.0.1",
"eslint-plugin-react": "^7.4.0",
"gulp": "^3.9.1",
"interface-ipfs-core": "~0.34.3",
"interface-ipfs-core": "~0.35.0",
"hapi": "^16.6.2",
"ipfsd-ctl": "~0.24.1",
"pre-commit": "^1.2.2",
Expand Down
4 changes: 2 additions & 2 deletions src/utils/pubsub-message-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ function deserializeFromBase64 (obj) {
from: bs58.encode(Buffer.from(obj.from, 'base64')).toString(),

This comment has been minimized.

Copy link
@daviddias

daviddias Nov 16, 2017

Contributor

Here it is correct

seqno: Buffer.from(obj.seqno, 'base64'),
data: Buffer.from(obj.data, 'base64'),
topicCIDs: obj.topicIDs || obj.topicCIDs
topicIDs: obj.topicIDs
}
}

function isPubsubMessage (obj) {
return obj && obj.from && obj.seqno && obj.data && (obj.topicIDs || obj.topicCIDs)
return obj && obj.from && obj.seqno && obj.data && obj.topicIDs
}

0 comments on commit 470777d

Please sign in to comment.