From e42ec57c653017cb1f3e8d76c79f61860788f67e Mon Sep 17 00:00:00 2001 From: "avi@robusta.dev" Date: Wed, 8 Jan 2025 15:55:46 +0200 Subject: [PATCH] loading json once --- src/robusta/integrations/receiver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/robusta/integrations/receiver.py b/src/robusta/integrations/receiver.py index 93c27151d..245a9a2d6 100644 --- a/src/robusta/integrations/receiver.py +++ b/src/robusta/integrations/receiver.py @@ -208,9 +208,10 @@ def _parse_websocket_message( @staticmethod def _parse_slack_message(message: Union[str, bytes, bytearray]) -> SlackActionsMessage: slack_actions_message = SlackActionsMessage.parse_raw(message) # this is slack callback format + json_slack_message = json.loads(message) for action in slack_actions_message.actions: action.value.slack_username = slack_actions_message.user.username - action.value.slack_message = json.loads(message) + action.value.slack_message = json_slack_message return slack_actions_message def on_message(self, ws: websocket.WebSocketApp, message: str) -> None: