From 3de814d893c5a5c61e2c89c93162e992f2714d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Wed, 29 Oct 2025 13:51:52 +0100 Subject: [PATCH] added posting in main --- client/daily_client.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/client/daily_client.py b/client/daily_client.py index 0e9c286..9cc2898 100644 --- a/client/daily_client.py +++ b/client/daily_client.py @@ -82,14 +82,23 @@ def post_to_teams(quote): headers = {"Content-Type": "application/json"} adaptive_card = { - "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", - "type": "AdaptiveCard", - "version": "1.2", - "body": [ - {"type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "Daily Quote"}, - {"type": "TextBlock", "wrap": False, "text": quote} - ] - } + "type": "AdaptiveCard", + "body": [ + { + "type": "TextBlock", + "size": "Medium", + "weight": "Bolder", + "text": "${title}" + }, + { + "type": "TextBlock", + "text": quote, + "wrap": True + } + ], + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.6" +} payload = { # keep text for flows that read triggerBody()['text'] @@ -124,4 +133,5 @@ def post_to_teams(quote): if __name__ == "__main__": # Fetch a quote and post it to Teams. Use env vars to override defaults. quote = get_quote() + post_to_teams(quote) print("Quote fetched:", quote)