Skip to content

Commit

Permalink
Add by_format to terse wehook for isse cred
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Costanzo <ian@anon-solutions.ca>
  • Loading branch information
ianco authored and ff137 committed Jul 4, 2024
1 parent 5a25d6c commit e7a2287
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class V20CredExRecordWebhook:
"credential_definition_id",
"schema_id",
"credential_id",
"by_format",
"trace",
"public_did",
"cred_id_stored",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ async def emit_event(self, session: ProfileSession, payload: Any = None):
else:
topic = f"{self.EVENT_NAMESPACE}::{self.RECORD_TOPIC}"

if session.profile.settings.get("debug.webhooks"):
if not payload:
payload = self.serialize()
# serialize payload before checking for webhook contents
if not payload:
payload = self.serialize()
else:
payload = V20CredExRecordWebhook(**self.__dict__)
payload = V20CredExRecordWebhook(**payload)
payload = payload.__dict__

await session.profile.notify(topic, payload)
Expand Down
3 changes: 3 additions & 0 deletions demo/run_bdd
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ fi
if ! [ -z "$WEBHOOK_TARGET" ]; then
DOCKER_ENV="${DOCKER_ENV} -e WEBHOOK_TARGET=${WEBHOOK_TARGET}"
fi
if ! [ -z "$ACAPY_DEBUG_WEBHOOKS" ]; then
DOCKER_ENV="${DOCKER_ENV} -e ACAPY_DEBUG_WEBHOOKS=${ACAPY_DEBUG_WEBHOOKS}"
fi
# if $TAILS_NETWORK is specified it will override any previously specified $DOCKER_NET
if ! [ -z "$TAILS_NETWORK" ]; then
DOCKER_NET="${TAILS_NETWORK}"
Expand Down

0 comments on commit e7a2287

Please sign in to comment.