Message loading

This commit is contained in:
2026-01-09 20:50:45 +01:00
parent 8df66a2a94
commit dad1e3f04a
3 changed files with 18 additions and 0 deletions
+14
View File
@@ -74,6 +74,20 @@ export class NodeClient {
await this.readyPromise;
}
loadInitialMessages(channelId: string) {
this.waitUntilReady().then(() => {
this.socket?.send(
JSON.stringify({
type: "load_chunk",
params: {
channel_id: channelId,
chunk_id: 0,
},
})
);
});
}
private async handleMessage(e: MessageEvent, authToken: string) {
// Voice packet
if (e.data instanceof Blob) {