瀏覽代碼

fix: add maxsplit=1 in wechatmp

master
lanvent 1 年之前
父節點
當前提交
d687f9329e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      channel/wechatmp/wechatmp_channel.py

+ 1
- 1
channel/wechatmp/wechatmp_channel.py 查看文件

@@ -223,7 +223,7 @@ class SubsribeAccountQuery():
channel.cache_dict.pop(cache_key)
else:
continue_text = "\n【未完待续,回复任意文字以继续】"
splits = split_string_by_utf8_length(content, MAX_UTF8_LEN - len(continue_text.encode('utf-8')))
splits = split_string_by_utf8_length(content, MAX_UTF8_LEN - len(continue_text.encode('utf-8')), max_split= 1)
reply_text = splits[0] + continue_text
channel.cache_dict[cache_key] = splits[1]
logger.info("[wechatmp] {}:{} Do send {}".format(web.ctx.env.get('REMOTE_ADDR'), web.ctx.env.get('REMOTE_PORT'), reply_text))


Loading…
取消
儲存