fix post to text

This commit is contained in:
felinae98 2021-07-07 18:07:06 +08:00
parent c41a40faa7
commit 0fae891def
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610
2 changed files with 4 additions and 1 deletions

View File

@ -12,3 +12,6 @@
- 将“来源”移动到文末
- 使用组合来构建新的platform新增状态改变类型订阅
## [0.3.1] -
- 修复不发送来源

View File

@ -103,6 +103,7 @@ class Post:
text += ' {}'.format(self.target_name)
if self.text:
text += ' \n{}'.format(self.text if len(self.text) < 500 else self.text[:500] + '...')
text += '来源: {}'.format(self.target_type)
if self._use_pic():
msgs.append(await parse_text(text))
if not self.target_type == 'rss' and self.url:
@ -111,7 +112,6 @@ class Post:
if self.url:
text += ' \n详情: {}'.format(self.url)
msgs.append(text)
text += '来源: {}'.format(self.target_type)
for pic in self.pics:
msgs.append("[CQ:image,file={url}]".format(url=pic))
if self.compress: