Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ PATCH ] 0.12.x with PR 3081 terse webhooks #3141

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add by_format to terse wehook for isse cred
Signed-off-by: Ian Costanzo <[email protected]>
ianco authored and jamshale committed Jul 31, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b10fec33c196030715d8cae378a39a60b03f1f54
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ class V20CredExRecordWebhook:
"credential_definition_id",
"schema_id",
"credential_id",
"by_format",
"trace",
"public_did",
"cred_id_stored",
Original file line number Diff line number Diff line change
@@ -197,11 +197,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)
3 changes: 3 additions & 0 deletions demo/run_bdd
Original file line number Diff line number Diff line change
@@ -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}"