aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-10-19 23:40:38 +0100
committerubq323 <ubq323@ubq323.website>2022-10-19 23:40:38 +0100
commitd3bc923ff1b040a86b6df951db25518a235dbc18 (patch)
treeabe3b9ed90a74a1fc70f60b050827c8c9ddfe314
parent2f8c207a18c23236d8c7c76e39157526b138745e (diff)
improve readability of irc messages (thank you trimill)
-rw-r--r--apioforum/webhooks.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/apioforum/webhooks.py b/apioforum/webhooks.py
index 5543687..7740c87 100644
--- a/apioforum/webhooks.py
+++ b/apioforum/webhooks.py
@@ -200,8 +200,8 @@ class ApionetWebhook(WebhookType):
p = ""
if forum['id'] != 1:
p = f" in {forum['name']}"
- payload = f"new thread{p}: \"{abridge(thread['title'],100)}\" - \"{abridge(post['content'],100)}\" (author: {username}) ->"
- self.send(self.append_url(payload,url))
+ payload = f"new thread{p}: [{abridge(thread['title'],50)}] {username}: {abridge(post['content'],75)}"
+ self.send(self.append_url(payload,"("+url+")"))
def on_new_post(self,post):
from .thread import post_jump
@@ -214,8 +214,8 @@ class ApionetWebhook(WebhookType):
url = post_jump(post['id'],external=True)
- payload = f"re: \"{abridge(thread['title'],100)}\" - \"{abridge(post['content'],100)}\" (author: {username}) ->"
- self.send(self.append_url(payload,url))
+ payload = f"[{abridge(thread['title'],50)}] {username}: {abridge(post['content'],75)}"
+ self.send(self.append_url(payload,"("+url+")"))