Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New puppet padchat #1256

Merged
merged 5 commits into from May 31, 2018
Merged

New puppet padchat #1256

merged 5 commits into from May 31, 2018

Conversation

lijiarui
Copy link
Member

see more todo list: #1249

The following functions has done and tested:

1. Create a padchat-schemas.ts to define all data structure.

  • PadchatContactRawPayload
  • PadchatMessageRawPayload
  • PadchatRoomRawPayload
  • PadchatMessageType

Import these structure to puppet-padchat.ts

2. Mock data in the following functions as the define data structure above:

  • function contactRawPayload()
  • function messageRawPayload()
  • function roomRawPayload()

3. Build the first connection:

  • function start(): set connection with websocket server
  • save wechat user profile to file: save 62(in ipad) data to profile.json

4. Implement the following payload:

  • function contactRawPayload()
  • funciont contactRawPayloadParser()
  • function messageRawPayload()
  • function messageRawPayloadParser()

5. Implement message send

  • function messageSendText()

6. Implement all ready function

  • function ready()

7. Run ding-dong-bot successfully

  • run WECHATY_PUPPET=padchat npm run demo

8. Implement more payload

  • function roomRawPayload()
  • function roomRawPayloadParser()

8. Implement more functions:

  • function logout()
  • function messageSendFile()
  • function messageForward()
  • function messageFile() : save file to local

10. Implement detailed functions

  • function contactAlias()
  • function contactFindAll()
  • functjion contactAvatar()
  • function roomFindAll()
  • function roomDel()
  • function roomAdd()
  • function roomTopic()
  • function roomCreate()
  • function roomQuit()

11. Make the connection stable and monitorable

  • initWatchdog : Detect the alive connection with websocket server

12. Others

  • friendRequestSend
  • friendRequestAccept

13. More

  • this.state.off()
  • function stop()

@huan huan merged commit 73fa8af into wechaty:master May 31, 2018
@lijiarui lijiarui deleted the new-puppet-padchat branch June 14, 2018 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants