Skip to content

Commit

Permalink
compatible with padchat for old users (#1496)
Browse files Browse the repository at this point in the history
  • Loading branch information
huan committed Jul 23, 2018
1 parent f644de4 commit 594451f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/puppet-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Wechaty Official Puppet Implementations List
*/
export const PUPPET_DEPENDENCIES = {
'default' : '0.0.0', // will be replaced with PUPPET_DEFAULT
'default' : '0.0.0', // will be replaced with PUPPET_DEFAULT
'padchat' : '0.0.0', // compatible with v0.18
///////////////////////////////////////
'wechaty-puppet-mock' : '^0.8.2',
'wechaty-puppet-padchat' : '^0.8.1',
'wechaty-puppet-puppeteer' : '^0.8.2',
Expand Down
4 changes: 4 additions & 0 deletions src/puppet-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export class PuppetManager {

if (!options.puppet || options.puppet === 'default') {
options.puppet = PUPPET_DEFAULT
} else if (options.puppet === 'padchat') {
// issue #1496 https://github.com/Chatie/wechaty/issues/1496
// compatible old settings for padchat
options.puppet = 'wechaty-puppet-padchat'
}

let puppetInstance: Puppet
Expand Down

0 comments on commit 594451f

Please sign in to comment.