Skip to content

Commit f9a27d7

Browse files
committed
fix: align topicid protobuf variable names
topicCID -> topicID
1 parent ae14d3e commit f9a27d7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/message/rpc.proto.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ message RPC {
66
77
message SubOpts {
88
optional bool subscribe = 1; // subscribe or unsubcribe
9-
optional string topicCID = 2;
9+
optional string topicID = 2;
1010
}
1111
1212
message Message {

src/peer.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class Peer extends EventEmitter {
105105
topics.forEach((topic) => {
106106
subs.push({
107107
subscribe: subscribe,
108-
topicCID: topic
108+
topicID: topic
109109
})
110110
})
111111

@@ -153,9 +153,9 @@ class Peer extends EventEmitter {
153153
updateSubscriptions (changes) {
154154
changes.forEach((subopt) => {
155155
if (subopt.subscribe) {
156-
this.topics.add(subopt.topicCID)
156+
this.topics.add(subopt.topicID)
157157
} else {
158-
this.topics.delete(subopt.topicCID)
158+
this.topics.delete(subopt.topicID)
159159
}
160160
})
161161
}

0 commit comments

Comments
 (0)