Skip to content

Commit

Permalink
fix: correclty save brainshare index (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickreynolds authored Oct 12, 2023
1 parent 6ffe247 commit 43cfc7d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ export class SaveMessageHandler extends AbstractMessageHandler {
// console.log('message received: ', message)
if (message.type === 'veramo.io-chat-v1') {
await context.agent.dataStoreSaveMessage({ message })
} else if (message.type === 'https://veramo.io/didcomm/brainshare/1.0/return-index' || message.type === 'https://veramo.io/didcomm/brainshare/1.0/return-credential') {
} else if (message.type === 'https://veramo.io/didcomm/brainshare/1.0/return-credential') {
await context.agent.dataStoreSaveVerifiableCredential({ verifiableCredential: message.data.credential })
} else if (message.type === 'https://veramo.io/didcomm/brainshare/1.0/return-index') {
await context.agent.dataStoreSaveVerifiableCredential({ verifiableCredential: message.data.index })
}
return super.handle(message, context)
}
Expand Down

0 comments on commit 43cfc7d

Please sign in to comment.