Skip to content

Commit

Permalink
fix: pass proper payloads to methods
Browse files Browse the repository at this point in the history
  • Loading branch information
gcharest authored Sep 17, 2024
1 parent a468440 commit 4937cdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def handle_webhook(id: str, payload: WebhookPayload | str, request: Request):
else:
webhook_payload = payload
webhook_payload.channel = webhook["channel"]["S"]
webhook_payload = append_incident_buttons(payload, id)
webhook_payload = append_incident_buttons(webhook_payload, id)
try:
request.state.bot.client.api_call(
"chat.postMessage", json=webhook_payload.model_dump()
Expand Down Expand Up @@ -378,7 +378,7 @@ def handle_string_payload(payload: str, request: Request) -> WebhookPayload | di
)
return {"ok": True}
if awsSnsPayload.Type == "Notification":
blocks = aws.parse(awsSnsPayload.Message, request.state.bot.client)
blocks = aws.parse(awsSnsPayload, request.state.bot.client)
# if we have an empty message, log that we have an empty
# message and return without posting to slack
if not blocks:
Expand Down

0 comments on commit 4937cdc

Please sign in to comment.