提交 f8ee2d2d 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

merge

此差异已折叠。
{
"name": "wechaty",
"version": "0.27.39",
"version": "0.27.40",
"description": "Wechaty is a Bot SDK for Wechat Personal Account",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
......
......@@ -87,10 +87,10 @@ test('systemPuppetName ()', async t => {
const WECHATY_PUPPET_ORIG = process.env.WECHATY_PUPPET
delete process.env.WECHATY_PUPPET
t.equal(config.systemPuppetName(), 'default', 'should get default as pupet name')
t.equal(config.systemPuppetName(), 'wechaty-puppet-puppeteer', 'should get wechaty-puppet-puppeteer as puppet name')
process.env.WECHATY_PUPPET = 'mock'
t.equal(config.systemPuppetName(), 'mock', 'should get pupet name from process.env')
process.env.WECHATY_PUPPET = 'wechaty-puppet-mock'
t.equal(config.systemPuppetName(), 'wechaty-puppet-mock', 'should get puppet name from process.env')
// restore the original value
process.env.WECHATY_PUPPET = WECHATY_PUPPET_ORIG
......
......@@ -851,6 +851,11 @@ export class Message extends Accessory implements Sayable {
* This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/Chatie/wechaty/wiki/Puppet#3-puppet-compatible-table)
*
* @returns {Promise<FileBox>}
*
* @example <caption>Save media file from a message</caption>
* const fileBox = await message.toFileBox()
* const fileName = fileBox.name
* fileBox.toFile(fileName)
*/
public async toFileBox (): Promise<FileBox> {
if (this.type() === Message.Type.Text) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册