Leo_chen

Results 26 issues of Leo_chen

**Is your feature request related to a problem? Please describe.** During the development of the plugin, I found that the method to be called needs to be judged according to...

feature request

1、从`puppet-wechat`发现群消息监听的时候会进行群成员的查询,而此方法比较耗时,可能达到6s左右。测试使用`await Promise.all`后时间缩短到2s,单应该还不是最好的状态 2、可以看到为了查询一个群成员会调用三次方法,而且每次调用方法都会把所有群成员的消息全部请求一遍,这就导致查询速度会降低很多,而且对同一个群也会查询三次,复用率很低,感觉可以优化一下,先查询群成员信息,再进行后续的步骤

![image](https://user-images.githubusercontent.com/20028566/178424084-fd9ccc43-4e84-48d6-bea5-86318c0eaac5.png) 会遇到默认头像找不到的情况,看到代码里对头像是取得相对位置,但是打包的时候并不会把头像打包进去,而且这个位置是相对于命令执行的目录来算相对路径的,建议可以更换为默认的base64 图片或者一个在线图片 ![image](https://user-images.githubusercontent.com/20028566/178424262-0cc7652f-76b4-4c9a-b631-371839401848.png)

1.x版本的 `puppet-wechat`新增了一个消息的属性`mentionIdList`,顾名思义是获取消息中mention的用户id,但是正是因为有这个方法,会导致消息延时严重,我本地测试了一下,在没有@人的情况下时间是 0.577ms,当在群里有一个@的时候时间已经是6.3s, 测试时间截图 主要影响的方法: 测试后发现如果有@人员,会导致循环所有群内成员,如果遇到同名群,会循环查询多次,而这个查询同样是耗时操作,最后导致消息事件延时严重,目前正寻找解决方法,同时希望能得到 @huan 的帮助来一块看一下

示例图片地址: `http://p3-webcast.douyinpic.com/img/webcast/6927462391257500419~tplv-resize:0:0.image` 问题: * 当我发送一个网络图片地址的时候,后缀名是不包含文件类型的,但是返回的`header`里`content-type`是`image/jpeg` ![image](https://user-images.githubusercontent.com/20028566/136784051-7325a552-c754-4fb7-83a3-b23d923cfbc6.png) * 当使用`const obj = FileBox.fromUrl(url)`直接构造一个`obj`对象时,打印出来的`mimeType`为空,此时我发现有个`ready`函数可以获取`header`里的contentType来赋值`mimeType`,在`FileBox.fromUrl(url)`之后加了一个`await obj.ready()`。使用后构造的`obj`对象`mimeType`是有值的。如下图 ![image](https://user-images.githubusercontent.com/20028566/136784633-e7e40360-b960-41f7-8969-2f28ef96729d.png) * 但是到发送的时候却报错`no MIME Type found on mediaMessage`,起初我以为是`file-box`包的问题,但是最后才发现是`wechaty-puppet-wechat`里`puppet-wechat.ts`有个`uploadMedia`方法,这里是直接用`name`去取`contentType`,并没有使用`obj`的`mimeType`属性,导致报错`no MIME Type found on mediaMessage` ![image](https://user-images.githubusercontent.com/20028566/136785190-1d0f3ba7-86e5-4001-94cd-5bcff928b109.png) 解决思路: 在`file-box`包中,我看到对`mimeType`是有多种取值方式的,那么在`wechaty-puppet-wechat`中是否可以也进行多种判断来赋值`mimeType`呢,例如传入的`file`对象`name`里能解析出`mimeType`就使用,解析不出就用`file`对象中`mimeType`属性。不知这种方法能否可行呢 @huan ,是否会影响到其他地方...

enhancement

下载下来按照教程执行,并未生成index.html访问出错,还是自己搭脚手架比较好

![image](https://user-images.githubusercontent.com/20028566/198009569-ef070b40-370e-4ccc-a552-42130f497d26.png)

Hello students! We want to make a Wechaty plugin to automatically label and classify based on content. It can help us to classify the chat content so that we can...

### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to file this...

bug
feat:agent

先留个记录,web协议是支持接受群邀请的,后续提交pr实现 ``` setCheckUrl: function(accountFactory){ _checkURLsuffix = "&skey=" + encodeURIComponent(accountFactory.getSkey()) + "&deviceid=" + encodeURIComponent(accountFactory.getDeviceID()) + "&pass_ticket=" + encodeURIComponent(accountFactory.getPassticket()) + "&opcode=2&scene=1&username=" + accountFactory.getUserName(); }, genCheckURL: function(url){ if(!_checkURLsuffix) throw "_checkURLsuffix is not ready!";...