全局geweclient
This commit is contained in:
@@ -7,6 +7,7 @@ from typing import Optional
|
||||
|
||||
from gewechat_client import GewechatClient
|
||||
|
||||
from gewechat.client import gewe_client
|
||||
from utils.wechat.contact_manager import ContactManager
|
||||
|
||||
|
||||
@@ -16,9 +17,9 @@ class MessageUtil:
|
||||
"""
|
||||
|
||||
# 修改 MessageUtil 类的初始化方法,接受联系人管理器而不是联系人字典
|
||||
def __init__(self, app_id: str, client: GewechatClient):
|
||||
self.app_id = app_id
|
||||
self.client = client
|
||||
def __init__(self):
|
||||
self.app_id = gewe_client.app_id
|
||||
self.client = gewe_client
|
||||
self.contact_manager = ContactManager.get_instance()
|
||||
self.LOG = logging.getLogger("MessageUtil")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user