From 778ebcdad932e637bbaa191769dbee5ca806525a Mon Sep 17 00:00:00 2001 From: Alex Kelly Date: Tue, 9 Nov 2021 01:41:44 -0500 Subject: [PATCH] feat: add slack formatter --- matrix_webhook/formatters/slack.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 matrix_webhook/formatters/slack.py diff --git a/matrix_webhook/formatters/slack.py b/matrix_webhook/formatters/slack.py new file mode 100644 index 0000000..e3210af --- /dev/null +++ b/matrix_webhook/formatters/slack.py @@ -0,0 +1,5 @@ +def formatter(data, headers): + """ format a message sent with slack api endpoints""" + text = data["attachments"][0]["text"] + data["body"] = f"{text}" + return data