Skip to content

Commit

Permalink
fix(chat): fix crash when replying to null conduit (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmasse committed Aug 24, 2021
1 parent ffeb091 commit 4d0542f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/server/src/chat/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ export class ChatService extends Service {
) {
// TODO: we don't need to get the config here. Just getting the conduitId would be way better
const conduit = await this.conduits.getByProviderAndChannel(client!.providerId, tunnel!.channelId)
if (!conduit) {
continue
}

const instance = await this.instances.get(conduit!.id)
await instance.sendToEndpoint(endpoint, payload)
}
Expand Down

0 comments on commit 4d0542f

Please sign in to comment.