Merge pull request #3507 from InfinityPacer/feature/subscribe

This commit is contained in:
jxxghp
2024-12-09 19:38:48 +08:00
committed by GitHub
+2 -2
View File
@@ -225,7 +225,7 @@ class _PluginBase(metaclass=ABCMeta):
return self.plugindata.del_data(plugin_id, key) return self.plugindata.del_data(plugin_id, key)
def post_message(self, channel: MessageChannel = None, mtype: NotificationType = None, title: str = None, def post_message(self, channel: MessageChannel = None, mtype: NotificationType = None, title: str = None,
text: str = None, image: str = None, link: str = None, userid: str = None): text: str = None, image: str = None, link: str = None, userid: str = None, username: str = None):
""" """
发送消息 发送消息
""" """
@@ -233,7 +233,7 @@ class _PluginBase(metaclass=ABCMeta):
link = settings.MP_DOMAIN(f"#/plugins?tab=installed&id={self.__class__.__name__}") link = settings.MP_DOMAIN(f"#/plugins?tab=installed&id={self.__class__.__name__}")
self.chain.post_message(Notification( self.chain.post_message(Notification(
channel=channel, mtype=mtype, title=title, text=text, channel=channel, mtype=mtype, title=title, text=text,
image=image, link=link, userid=userid image=image, link=link, userid=userid, username=username
)) ))
def close(self): def close(self):