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

Pubsub message fields #627

Merged
merged 2 commits into from
Nov 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(),
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
}