From b0ce34042a9619b8f52675257ab367ab4b5235ae Mon Sep 17 00:00:00 2001 From: windmemory Date: Thu, 20 Aug 2020 15:25:47 +0800 Subject: [PATCH] add contact phone rpc call definition --- proto/wechaty/puppet.proto | 1 + proto/wechaty/puppet/contact.proto | 8 ++++++++ tests/puppet-server-impl.ts | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/proto/wechaty/puppet.proto b/proto/wechaty/puppet.proto index 39426d54..94ce4c9d 100644 --- a/proto/wechaty/puppet.proto +++ b/proto/wechaty/puppet.proto @@ -65,6 +65,7 @@ service Puppet { rpc ContactAlias (puppet.ContactAliasRequest) returns (puppet.ContactAliasResponse) {} rpc ContactAvatar (puppet.ContactAvatarRequest) returns (puppet.ContactAvatarResponse) {} + rpc ContactPhone (puppet.ContactPhoneRequest) returns (puppet.ContactPhoneResponse) {} rpc ContactList (puppet.ContactListRequest) returns (puppet.ContactListResponse) {} diff --git a/proto/wechaty/puppet/contact.proto b/proto/wechaty/puppet/contact.proto index cb14f8e4..4a92b388 100644 --- a/proto/wechaty/puppet/contact.proto +++ b/proto/wechaty/puppet/contact.proto @@ -75,3 +75,11 @@ message ContactAvatarResponse { google.protobuf.StringValue filebox = 1; } +message ContactPhoneRequest { + string contact_id = 1; + repeated string phone_list = 2; +} + +message ContactPhoneResponse { + repeated string phone_list = 2; +} diff --git a/tests/puppet-server-impl.ts b/tests/puppet-server-impl.ts index dee3063f..958b70a8 100644 --- a/tests/puppet-server-impl.ts +++ b/tests/puppet-server-impl.ts @@ -31,6 +31,12 @@ export const puppetServerImpl: IPuppetServer = { throw new Error('not implmented.') }, + contactPhone: (call, callback) => { + void call + void callback + throw new Error('not implemented.') + }, + contactSelfName: (call, callback) => { void call void callback