(opts: BroadcastOptions, rooms: Room[])
| 508 | } |
| 509 | |
| 510 | override async addSockets(opts: BroadcastOptions, rooms: Room[]) { |
| 511 | const onlyLocal = opts.flags?.local; |
| 512 | |
| 513 | if (!onlyLocal) { |
| 514 | try { |
| 515 | await this.publishAndReturnOffset({ |
| 516 | type: MessageType.SOCKETS_JOIN, |
| 517 | data: { |
| 518 | opts: encodeOptions(opts), |
| 519 | rooms, |
| 520 | }, |
| 521 | }); |
| 522 | } catch (e) { |
| 523 | debug("[%s] error while publishing message: %s", this.uid, e.message); |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | super.addSockets(opts, rooms); |
| 528 | } |
| 529 | |
| 530 | override async delSockets(opts: BroadcastOptions, rooms: Room[]) { |
| 531 | const onlyLocal = opts.flags?.local; |
nothing calls this directly
no test coverage detected