瀏覽代碼

fix compatibility

master
Bachery 1 年之前
父節點
當前提交
c2e4d88842
共有 2 個檔案被更改,包括 8 行新增6 行删除
  1. +4
    -3
      channel/wechat/wechat_channel.py
  2. +4
    -3
      channel/wechat/wechaty_channel.py

+ 4
- 3
channel/wechat/wechat_channel.py 查看文件

@@ -149,9 +149,10 @@ class WechatChannel(Channel):
context = dict()
group_name = msg['User']['NickName']
group_id = msg['User']['UserName']
if ('ALL_GROUP' in conf().get('group_chat_in_one_session') or \
group_name in conf().get('group_chat_in_one_session')) or \
self.check_contain(group_name, conf().get('group_chat_in_one_session')):
group_chat_in_one_session = conf().get('group_chat_in_one_session', [])
if ('ALL_GROUP' in group_chat_in_one_session or \
group_name in group_chat_in_one_session or \
self.check_contain(group_name, group_chat_in_one_session)):
context['session_id'] = group_id
else:
context['session_id'] = msg['ActualUserName']


+ 4
- 3
channel/wechat/wechaty_channel.py 查看文件

@@ -163,9 +163,10 @@ class WechatyChannel(Channel):
if not query:
return
context = dict()
if ('ALL_GROUP' in conf().get('group_chat_in_one_session') or \
group_name in conf().get('group_chat_in_one_session') or \
self.check_contain(group_name, conf().get('group_chat_in_one_session'))):
group_chat_in_one_session = conf().get('group_chat_in_one_session', [])
if ('ALL_GROUP' in group_chat_in_one_session or \
group_name in group_chat_in_one_session or \
self.check_contain(group_name, group_chat_in_one_session)):
context['session_id'] = str(group_id)
else:
context['session_id'] = str(group_id) + '-' + str(group_user_id)


Loading…
取消
儲存