python-wechaty icon indicating copy to clipboard operation
python-wechaty copied to clipboard

这个能不能对接puppet-xp协议啊

Open xinxinyihao opened this issue 3 years ago • 12 comments

这个能不能对接puppet-xp协议啊

xinxinyihao avatar Jan 20 '22 01:01 xinxinyihao

可以,但只能作为gateway服务对接 参考这里

$ npm install -g wechaty@next wechaty-puppet-xp
$ wechaty gateway --puppet wechaty-puppet-xp

另外,需要在启动wechaty gateway前设定WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER=true

然后目前我测试下来,貌似还只能发文本,然后自动添加好友请求貌似也实现不了,更多群聊功能有待测试

bigbrother666sh avatar Jan 20 '22 01:01 bigbrother666sh

@WukongZeming you can write a blog to doc it.

wj-Mcat avatar Jan 22 '22 07:01 wj-Mcat

@WukongZeming you can write a blog to doc it.

I'd like to do it, but where?

bigbrother666sh avatar Jan 22 '22 09:01 bigbrother666sh

You can post a PR to: https://github.com/wechaty/wechaty.js.org

wj-Mcat avatar Jan 22 '22 10:01 wj-Mcat

可以,但只能作为gateway服务对接 参考这里

$ npm install -g wechaty@next wechaty-puppet-xp
$ wechaty gateway --puppet wechaty-puppet-xp

另外,需要在启动wechaty gateway前设定WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER=true

然后目前我测试下来,貌似还只能发文本,然后自动添加好友请求貌似也实现不了,更多群聊功能有待测试

嗯,今天下午试了一下,只能发文本,然后就放弃了。

xinxinyihao avatar Jan 22 '22 18:01 xinxinyihao

@wj-Mcat When I tried to repeat the full process on a totally new windows PC for making sure the doc would be perfect, somethin w wired just happened. the puppet-xp gateway service can be luanched, however it raise an 'eventName post unsupported' Error and get crushed as soon as the python-wechaty program connect.

the Error log as follows:

Error: eventName post unsupported!
    at EventStreamManager.connectPuppetEventToStreamingCall (file:///C:/Users/bigbr/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/event-stream-manager.js:216:27)
    at EventStreamManager.start (file:///C:/Users/bigbr/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/event-stream-manager.js:41:41)
    at event (file:///C:/Users/bigbr/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/puppet-implementation.js:287:32)
    at Object.event (file:///C:/Users/bigbr/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/auth/auth-impl-token.js:26:28)
    at handleServerStreaming (C:\Users\bigbr\AppData\Roaming\npm\node_modules\wechaty\node_modules\@grpc\grpc-js\build\src\server.js:696:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

some ideas? many thanks

bigbrother666sh avatar Jan 24 '22 14:01 bigbrother666sh

the next version of wechaty is in heavy developing if a new feature:

  • https://github.com/wechaty/wechaty/issues/2245

Please downgrade the version to latest for preventing this error.

huan avatar Jan 24 '22 14:01 huan

does the latest vesion support CLI creating gateway service?

bigbrother666sh avatar Jan 25 '22 00:01 bigbrother666sh

@WukongZeming No, it does not support. The CLI is developed recently and only exists in the @next version for now...

For this problem, it seems that it would be very easy to fix in the wechaty-puppet-service module to add code for dealing the post type of the event in it, if you can send a PR to fix it, I'd like to accept it and make it a quick fix.

Or you can help us to file an issue to recorded this problem at https://github.com/wechaty/puppet-service/issues

huan avatar Jan 25 '22 02:01 huan

I wish I could, but I really have no knowledge about jave programming.... I'll rise the issue rightnow Sorry again

bigbrother666sh avatar Jan 25 '22 03:01 bigbrother666sh

and I still wonder that why it works well just last week but cannot this week? do you have updated the next-version-programe at the weekend(around 1.22~1.23)?

bigbrother666sh avatar Jan 25 '22 03:01 bigbrother666sh

I'll raise the issue right now

That would be a great help, thank you very much!

do you have updated the next-version-program at the weekend(around 1.22~1.23)?

Yes, we are always developing on the @next to help us move forward.

We have merged the Post support on both Wechaty & Puppet systems last weekend.

See:

  • https://github.com/wechaty/wechaty/pull/2249

huan avatar Jan 25 '22 03:01 huan