From 4937cdc36ef9a6aa16f9972cd15cef77951217b8 Mon Sep 17 00:00:00 2001 From: Guillaume Charest <1690085+gcharest@users.noreply.github.com> Date: Tue, 17 Sep 2024 12:51:26 +0000 Subject: [PATCH] fix: pass proper payloads to methods --- app/server/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/server/server.py b/app/server/server.py index 510c3b28..519b54a2 100644 --- a/app/server/server.py +++ b/app/server/server.py @@ -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() @@ -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: