relayx-js 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/examples/example_chat.js +1 -1
- package/package.json +1 -1
- package/realtime/realtime.js +5 -3
package/CHANGELOG.md
CHANGED
package/examples/example_chat.js
CHANGED
|
@@ -61,7 +61,7 @@ async function run(){
|
|
|
61
61
|
var endDate = new Date(past)
|
|
62
62
|
|
|
63
63
|
var history = await realtime.history(topic, pastDate, endDate)
|
|
64
|
-
console.log(history)
|
|
64
|
+
// console.log(history)
|
|
65
65
|
})
|
|
66
66
|
}else if(input == "off"){
|
|
67
67
|
rl.question("topic to off(): ", async (topic) => {
|
package/package.json
CHANGED
package/realtime/realtime.js
CHANGED
|
@@ -485,6 +485,8 @@ export class Realtime {
|
|
|
485
485
|
end = end.toISOString();
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
+
console.log(`END => ${end}`)
|
|
489
|
+
|
|
488
490
|
await this.#createOrGetStream();
|
|
489
491
|
|
|
490
492
|
var opts = {
|
|
@@ -501,9 +503,7 @@ export class Realtime {
|
|
|
501
503
|
|
|
502
504
|
this.#consumerMap[topic] = consumer;
|
|
503
505
|
|
|
504
|
-
const msgs = await consumer.
|
|
505
|
-
expires: 10000
|
|
506
|
-
});
|
|
506
|
+
const msgs = await consumer.consume();
|
|
507
507
|
|
|
508
508
|
var history = [];
|
|
509
509
|
|
|
@@ -516,6 +516,8 @@ export class Realtime {
|
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
+
console.log(m.timestamp)
|
|
520
|
+
|
|
519
521
|
var data = m.json();
|
|
520
522
|
history.push(data.message);
|
|
521
523
|
}
|