|
40 | 40 | LOGGER = logging.getLogger(__name__)
|
41 | 41 |
|
42 | 42 | EVENT_PATTERN_WEBHOOK = re.compile("^acapy::webhook::(.*)$")
|
43 |
| -EVENT_PATTERN_RECORD = re.compile("^acapy::record::(.*)$") |
| 43 | +EVENT_PATTERN_RECORD = re.compile("^acapy::record::([^:]*)(?:::.*)?$") |
44 | 44 |
|
45 | 45 | EVENT_WEBHOOK_MAPPING = {
|
46 | 46 | "acapy::basicmessage::received": "basicmessages",
|
@@ -450,8 +450,8 @@ def sort_dict(raw: dict) -> dict:
|
450 | 450 |
|
451 | 451 | event_bus = self.context.inject(EventBus, required=False)
|
452 | 452 | if event_bus:
|
453 |
| - event_bus.subscribe(EVENT_PATTERN_WEBHOOK, self.__on_webhook_event) |
454 |
| - event_bus.subscribe(EVENT_PATTERN_RECORD, self.__on_record_event) |
| 453 | + event_bus.subscribe(EVENT_PATTERN_WEBHOOK, self._on_webhook_event) |
| 454 | + event_bus.subscribe(EVENT_PATTERN_RECORD, self._on_record_event) |
455 | 455 |
|
456 | 456 | for event_topic, webhook_topic in EVENT_WEBHOOK_MAPPING.items():
|
457 | 457 | event_bus.subscribe(
|
@@ -788,13 +788,13 @@ async def websocket_handler(self, request):
|
788 | 788 |
|
789 | 789 | return ws
|
790 | 790 |
|
791 |
| - async def __on_webhook_event(self, profile: Profile, event: Event): |
| 791 | + async def _on_webhook_event(self, profile: Profile, event: Event): |
792 | 792 | match = EVENT_PATTERN_WEBHOOK.search(event.topic)
|
793 | 793 | webhook_topic = match.group(1) if match else None
|
794 | 794 | if webhook_topic:
|
795 | 795 | await self.send_webhook(profile, webhook_topic, event.payload)
|
796 | 796 |
|
797 |
| - async def __on_record_event(self, profile: Profile, event: Event): |
| 797 | + async def _on_record_event(self, profile: Profile, event: Event): |
798 | 798 | match = EVENT_PATTERN_RECORD.search(event.topic)
|
799 | 799 | webhook_topic = match.group(1) if match else None
|
800 | 800 | if webhook_topic:
|
|
0 commit comments