Skip to content

Commit 7647590

Browse files
committed
fix: relax admin server record event pattern
Should now accept stateless record event topics Signed-off-by: Daniel Bluhm <[email protected]>
1 parent 98cdca7 commit 7647590

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aries_cloudagent/admin/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
LOGGER = logging.getLogger(__name__)
4141

4242
EVENT_PATTERN_WEBHOOK = re.compile("^acapy::webhook::(.*)$")
43-
EVENT_PATTERN_RECORD = re.compile("^acapy::record::(.*)::(.*)$")
43+
EVENT_PATTERN_RECORD = re.compile("^acapy::record::(.*)$")
4444

4545
EVENT_WEBHOOK_MAPPING = {
4646
"acapy::basicmessage::received": "basicmessages",
@@ -800,7 +800,7 @@ async def __on_record_event(self, profile: Profile, event: Event):
800800
if webhook_topic:
801801
await self.send_webhook(profile, webhook_topic, event.payload)
802802

803-
async def send_webhook(self, profile: Profile, topic: str, payload: dict):
803+
async def send_webhook(self, profile: Profile, topic: str, payload: dict = None):
804804
"""Add a webhook to the queue, to send to all registered targets."""
805805
wallet_id = profile.settings.get("wallet.id")
806806
webhook_urls = profile.settings.get("admin.webhook_urls")

0 commit comments

Comments
 (0)