Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -62,13 +62,19 @@ def monitor_new_posts():
|
|
62 |
print(f"URL: {submission.url}")
|
63 |
print(f"Content: {submission.selftext}\n")
|
64 |
|
|
|
|
|
|
|
|
|
65 |
response = slack_client.chat_postMessage(
|
66 |
channel=SLACK_CHANNEL_ID_TEST,
|
67 |
-
text=
|
68 |
thread_ts=None,
|
69 |
unfurl_links=False,
|
70 |
unfurl_media=False
|
71 |
)
|
|
|
|
|
72 |
except Exception as e:
|
73 |
print(f"Error during streaming submissions: {e}")
|
74 |
|
|
|
62 |
print(f"URL: {submission.url}")
|
63 |
print(f"Content: {submission.selftext}\n")
|
64 |
|
65 |
+
text_content = f"*{submission.title}*"
|
66 |
+
if submission.selftext:
|
67 |
+
text_content += f"\n{submission.selftext}"
|
68 |
+
|
69 |
response = slack_client.chat_postMessage(
|
70 |
channel=SLACK_CHANNEL_ID_TEST,
|
71 |
+
text=text_content,
|
72 |
thread_ts=None,
|
73 |
unfurl_links=False,
|
74 |
unfurl_media=False
|
75 |
)
|
76 |
+
|
77 |
+
|
78 |
except Exception as e:
|
79 |
print(f"Error during streaming submissions: {e}")
|
80 |
|