Merge pull request #520 from KuroiCc/fix/notification-content

fix: 🐛 通知的内容包含无意义的前导和尾随空格
This commit is contained in:
Estrella Pan
2023-10-05 11:08:30 +08:00
committed by GitHub
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