Skip to content

Commit

Permalink
loading json once
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi-Robusta committed Jan 8, 2025
1 parent 942c279 commit e42ec57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/robusta/integrations/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e42ec57

Please sign in to comment.