Skip to content

Commit

Permalink
fix: their did doc not ours (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoGlastra authored Aug 25, 2021
1 parent 2d31b87 commit 0226609
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/modules/routing/RecipientModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ export class RecipientModule {
const { message, connectionRecord } = await this.connectionService.createTrustPing(mediator.connectionId)

const websocketSchemes = ['ws', 'wss']
const hasWebSocketTransport =
connectionRecord.didDoc.didCommServices.filter((s) => websocketSchemes.includes(s.protocolScheme)).length > 0
const hasWebSocketTransport = connectionRecord.theirDidDoc?.didCommServices?.some((s) =>
websocketSchemes.includes(s.protocolScheme)
)

if (!hasWebSocketTransport) {
throw new AriesFrameworkError('Cannot open websocket to connection without websocket service endpoint')
Expand Down

0 comments on commit 0226609

Please sign in to comment.