Skip to content

Commit

Permalink
fix bulk message handling
Browse files Browse the repository at this point in the history
  • Loading branch information
williamhorning committed Dec 22, 2024
1 parent b134354 commit e0764a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/rvapi/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jersey/rvapi",
"version": "0.0.5",
"version": "0.0.6",
"exports": "./src/mod.ts",
"imports": {
"@denosaurs/event": "jsr:@denosaurs/event@^2.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/rvapi/src/bonfire/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class Bonfire extends EventEmitter<
*/
private handle_message(message: ServerMessage) {
if (message.type === 'Bulk') {
message.messages.forEach((m) => this.handle_message(m));
message.v.forEach((m) => this.handle_message(m));
}
// deno-lint-ignore no-explicit-any
this.emit(message.type, message as any);
Expand Down
2 changes: 1 addition & 1 deletion packages/rvapi/src/bonfire/server_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface Authenticated {

interface Bulk {
type: 'Bulk';
messages: ServerMessage[];
v: ServerMessage[];
}

interface Pong {
Expand Down

0 comments on commit e0764a9

Please sign in to comment.