Skip to content

Commit

Permalink
refactor: change return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Ad96el committed Aug 11, 2023
1 parent efcd4b5 commit 7ebb031
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/messaging/CredentialApiMessageType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ export function verifyMessageEnvelope(message: IMessage): void {
*
* @param decryptedMessage The decrypted message to check.
*/
export function assertKnownMessage(decryptedMessage: IMessage): void {
export function assertKnownMessage(decryptedMessage: IMessage): IMessage['body'] {
verifyMessageBody(decryptedMessage)
verifyMessageEnvelope(decryptedMessage)
ensureOwnerIsSender(decryptedMessage)
return decryptedMessage.body
}
7 changes: 7 additions & 0 deletions src/tests/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
/**
* Copyright (c) 2018-2023, BOTLabs GmbH.
*
* This source code is licensed under the BSD 4-Clause "Original" license
* found in the LICENSE file in the root directory of this source tree.
*/

export * from './messageUtils'
export * from './utils'

0 comments on commit 7ebb031

Please sign in to comment.