diff --git a/package.json b/package.json index 71658633e..a8c4b2dc5 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ }, "homepage": "https://github.com/wechaty/", "dependencies": { - "@juzi/wechaty-puppet-service": "^1.0.92", + "@juzi/wechaty-puppet-service": "^1.0.93", "clone-class": "^1.1.1", "cmd-ts": "^0.10.0", "cockatiel": "^2.0.2", @@ -132,7 +132,7 @@ "@chatie/eslint-config": "^1.0.4", "@chatie/semver": "^0.4.7", "@chatie/tsconfig": "^4.6.3", - "@juzi/wechaty-puppet": "^1.0.84", + "@juzi/wechaty-puppet": "^1.0.86", "@juzi/wechaty-puppet-mock": "^1.0.1", "@swc/core": "1.3.44", "@swc/helpers": "^0.3.6", diff --git a/src/user-modules/friendship.ts b/src/user-modules/friendship.ts index 056559196..47d292a8a 100644 --- a/src/user-modules/friendship.ts +++ b/src/user-modules/friendship.ts @@ -96,11 +96,15 @@ class FriendshipMixin extends MixinBase implements Accepter { */ static async search ( queryFilter : PUPPET.filters.Friendship, + type?: PUPPET.types.Contact, ): Promise { log.verbose('Friendship', 'static search("%s")', JSON.stringify(queryFilter), ) - const contactId = await this.wechaty.puppet.friendshipSearch(queryFilter) + if (typeof (type) === 'undefined') { + type = PUPPET.types.Contact.Individual + } + const contactId = await this.wechaty.puppet.friendshipSearch(queryFilter, type) if (!contactId) { return undefined