Skip to content

Commit

Permalink
fix: align topicid protobuf variable names
Browse files Browse the repository at this point in the history
topicCID -> topicID
  • Loading branch information
wemeetagain committed Apr 16, 2019
1 parent ae14d3e commit f9a27d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/message/rpc.proto.js
Expand Up @@ -6,7 +6,7 @@ message RPC {
message SubOpts {
optional bool subscribe = 1; // subscribe or unsubcribe
optional string topicCID = 2;
optional string topicID = 2;
}
message Message {
Expand Down
6 changes: 3 additions & 3 deletions src/peer.js
Expand Up @@ -105,7 +105,7 @@ class Peer extends EventEmitter {
topics.forEach((topic) => {
subs.push({
subscribe: subscribe,
topicCID: topic
topicID: topic
})
})

Expand Down Expand Up @@ -153,9 +153,9 @@ class Peer extends EventEmitter {
updateSubscriptions (changes) {
changes.forEach((subopt) => {
if (subopt.subscribe) {
this.topics.add(subopt.topicCID)
this.topics.add(subopt.topicID)
} else {
this.topics.delete(subopt.topicCID)
this.topics.delete(subopt.topicID)
}
})
}
Expand Down

0 comments on commit f9a27d7

Please sign in to comment.