fix: 🐛 The content of the notification contains meaningless leading and trailing whitespace

This commit is contained in:
Kuroi_Cc
2023-10-05 11:37:42 +09:00
parent 0ef37f609b
commit 2f38d07729
5 changed files with 5 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ class BarkNotification(RequestContent):
text = f"""
番剧名称:{notify.official_title}\n季度: 第{notify.season}季\n更新集数: 第{notify.episode}集\n{notify.poster_path}\n
"""
return text
return text.strip()
def post_msg(self, notify: Notification) -> bool:
text = self.gen_message(notify)

View File

@@ -18,7 +18,7 @@ class ServerChanNotification(RequestContent):
text = f"""
番剧名称:{notify.official_title}\n季度: 第{notify.season}季\n更新集数: 第{notify.episode}集\n{notify.poster_path}\n
"""
return text
return text.strip()
def post_msg(self, notify: Notification) -> bool:
text = self.gen_message(notify)

View File

@@ -17,7 +17,7 @@ class SlackNotification(RequestContent):
text = f"""
番剧名称:{notify.official_title}\n季度: 第{notify.season}季\n更新集数: 第{notify.episode}集\n{notify.poster_path}\n
"""
return text
return text.strip()
def post_msg(self, notify: Notification) -> bool:
text = self.gen_message(notify)

View File

@@ -18,7 +18,7 @@ class TelegramNotification(RequestContent):
text = f"""
番剧名称:{notify.official_title}\n季度: 第{notify.season}季\n更新集数: 第{notify.episode}集
"""
return text
return text.strip()
def post_msg(self, notify: Notification) -> bool:
text = self.gen_message(notify)

View File

@@ -20,7 +20,7 @@ class WecomNotification(RequestContent):
text = f"""
番剧名称:{notify.official_title}\n季度: 第{notify.season}季\n更新集数: 第{notify.episode}集\n{notify.poster_path}\n
"""
return text
return text.strip()
def post_msg(self, notify: Notification) -> bool:
##Change message format to match Wecom push better