Skip to content

Support other message type. #40

@chs97

Description

@chs97

Problem

When I use a mocker to test my robot, I want to send some other type to my robot, such as UrlLink、Filebox, because my robot will not reply message except text type.
My test code like:

  const mp = new MiniProgram({
    title: 'mock',
  })
  await puppet.start()
  user.say(mp).to(mary)

I find the mocker only supports the text.

Solution

It's mock, all object can set or get on memory, so I think to use a map make other type binds to the message. Make the API the same as Message. It's very clear that when a message type isn't text, then get the attachment from the pool.
#39

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions