Skip to content

Commit f5e262a

Browse files
committed
Revert "transport.outbound.manager: remove redundant obj from webhook"
This reverts commit 34c9805. Signed-off-by: Victor Lee <victorlee0505@gmail.com>
1 parent 2f65c07 commit f5e262a

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

aries_cloudagent/transport/outbound/manager.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
from typing import Callable, Type, Union
99
from urllib.parse import urlparse
10-
from collections import MutableMapping
11-
from contextlib import suppress
1210

1311
from ...connections.models.connection_target import ConnectionTarget
1412
from ...core.profile import Profile
@@ -27,8 +25,6 @@
2725
)
2826
from .message import OutboundMessage
2927

30-
from .constants import REMOVE_KEY
31-
3228
LOGGER = logging.getLogger(__name__)
3329
MODULE_BASE_PATH = "aries_cloudagent.transport.outbound"
3430

@@ -91,13 +87,10 @@ def __init__(self, profile: Profile, handle_not_delivered: Callable = None):
9187
self.running_transports = {}
9288
self.task_queue = TaskQueue(max_active=200)
9389
self._process_task: asyncio.Task = None
94-
self.light_webhook = False
9590
if self.root_profile.settings.get("transport.max_outbound_retry"):
9691
self.MAX_RETRY_COUNT = self.root_profile.settings[
9792
"transport.max_outbound_retry"
9893
]
99-
if self.root_profile.settings.get("transport.light_weight_webhook"):
100-
self.light_webhook = True
10194

10295
async def setup(self):
10396
"""Perform setup operations."""
@@ -316,14 +309,6 @@ async def encode_outbound_message(
316309

317310
return outbound_message
318311

319-
def delete_keys_from_dict(self, dictionary, keys):
320-
for key in keys:
321-
with suppress(KeyError):
322-
del dictionary[key]
323-
for value in dictionary.values():
324-
if isinstance(value, MutableMapping):
325-
self.delete_keys_from_dict(value, keys)
326-
327312
def enqueue_webhook(
328313
self,
329314
topic: str,
@@ -358,10 +343,6 @@ def enqueue_webhook(
358343
queued.payload = json.dumps(payload)
359344
queued.state = QueuedOutboundMessage.STATE_PENDING
360345
queued.retries = 4 if max_attempts is None else max_attempts - 1
361-
362-
if self.light_webhook:
363-
self.delete_keys_from_dict(payload, REMOVE_KEY)
364-
queued.payload = json.dumps(payload)
365346
self.outbound_new.append(queued)
366347
self.process_queued()
367348

0 commit comments

Comments
 (0)