Subscribe to event type and message.

This mirrors a change in the client where we extract the type of the
event.
This commit is contained in:
Eli Ribble 2024-09-04 11:41:33 -07:00
parent 5cae71653f
commit c686f5c8d9
2 changed files with 7 additions and 4 deletions

View File

@ -370,8 +370,11 @@ export default class Client {
.replace("{types}", "*")
.replace("{closeafter}", "no")
.replace("{ping}", "60");
this.jclient.subscribeToEvents(eventSourceUrl, (e) => {
console.log("Got an event!", e);
});
this.jclient.subscribeToEvents(
eventSourceUrl,
(type: string, message: PushMessage) => {
console.log("Got an event!", type, message);
},
);
}
}

@ -1 +1 @@
Subproject commit 2ef5f5b7fa0a22a499bd32831ac24622f17e10e6
Subproject commit 160a66caf7f385b18e25f224a64f75f213997bb2