+10
-20
crates/atproto-jetstream/src/consumer.rs
+10
-20
crates/atproto-jetstream/src/consumer.rs
···
261
261
// Add requireHello parameter
262
262
query_params.push(format!("requireHello={}", self.config.require_hello));
263
263
264
-
// Add wantedCollections if specified
265
-
if !self.config.collections.is_empty() {
266
-
let collections = self
267
-
.config
268
-
.collections
269
-
.iter()
270
-
.map(|c| urlencoding::encode(c))
271
-
.collect::<Vec<_>>()
272
-
.join(",");
273
-
query_params.push(format!("wantedCollections={}", collections));
264
+
// Add wantedCollections if specified (each collection as a separate query parameter)
265
+
if !self.config.collections.is_empty() && !self.config.require_hello {
266
+
for collection in &self.config.collections {
267
+
query_params.push(format!("wantedCollections={}", urlencoding::encode(collection)));
268
+
}
274
269
}
275
270
276
-
// Add wantedDids if specified
277
-
if !self.config.dids.is_empty() {
278
-
let dids = self
279
-
.config
280
-
.dids
281
-
.iter()
282
-
.map(|d| urlencoding::encode(d))
283
-
.collect::<Vec<_>>()
284
-
.join(",");
285
-
query_params.push(format!("wantedDids={}", dids));
271
+
// Add wantedDids if specified (each DID as a separate query parameter)
272
+
if !self.config.dids.is_empty() && !self.config.require_hello {
273
+
for did in &self.config.dids {
274
+
query_params.push(format!("wantedDids={}", urlencoding::encode(did)));
275
+
}
286
276
}
287
277
288
278
// Add maxMessageSizeBytes if specified