support send image as file

This commit is contained in:
2021-10-30 18:08:37 +08:00
parent 5bf5b5bd7f
commit 9b349e79ff
4 changed files with 71 additions and 14 deletions

View File

@@ -24,10 +24,11 @@ class RSSConfig:
self.show_content = True
self.send_media = True
self.display_entry_link = False
self.send_img_as_file = False
if d is not None:
for k in d.keys():
if hasattr(self, k):
setattr(self, k, d[k])
def toJson(self):
return dumps({'disable_web_page_preview': self.disable_web_page_preview, 'show_RSS_title': self.show_RSS_title, 'show_Content_title': self.show_Content_title, 'show_content': self.show_content, 'send_media': self.send_media, 'display_entry_link': self.display_entry_link}, ensure_ascii=False)
return dumps({'disable_web_page_preview': self.disable_web_page_preview, 'show_RSS_title': self.show_RSS_title, 'show_Content_title': self.show_Content_title, 'show_content': self.show_content, 'send_media': self.send_media, 'display_entry_link': self.display_entry_link, 'send_img_as_file': self.send_img_as_file}, ensure_ascii=False)