Skip to content

Commit

Permalink
Merge pull request #12 from wemeetagain/fix/topicid
Browse files Browse the repository at this point in the history
fix: align topicid protobuf variable names
  • Loading branch information
vasco-santos authored Apr 16, 2019
2 parents ae14d3e + f9a27d7 commit 5ef5a35
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 5ef5a35

Please sign in to comment.