Closed WangEdward closed 1 year ago
感谢 PR,我确认一下。
也许是因为内存地址引用,所以修改是能被正常保存的,但是由于在 token-store.go#L227
被 return 掉了,所以底下TokenStoreAddItem
中的 item.Refresh()
没有被执行,因此点击通道页面的测试会显示 缺少access_token参数 的报错
稍等哈,我现在正在实现 OneBot 协议的支持。
我感觉我得检查一下其他地方了,感觉类似的问题应该不止一个。
我已经修改了,感谢 PR~
新版本 v0.4.1-alpha
已推送,期待测试。
Fix the address issue when updating the Wecom channel detail 修复原代码无法修改被添加的企业微信应用号通道的问题
复现过程
在通道中新增一个企业微信应用,填入(错误的)资料,保存后再进行修改
Secret
,在AppId
相同的情况下,这一行代码会将原来内存引用的oldChannel
变量中的AppId
也删除,因此在调用parseWechatCorpAccountAppId
方法时会传入空值,返回错误 “无效的微信企业号配置” https://github.com/songquanpeng/message-pusher/blob/39da3f977148b0bed6ef762f976757832176789f/channel/token-store.go#L178