Skip to content

Commit de762e9

Browse files
authored
add contact phone rpc call definition (#80)
1 parent 805843e commit de762e9

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

proto/wechaty/puppet.proto

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ service Puppet {
6565

6666
rpc ContactAlias (puppet.ContactAliasRequest) returns (puppet.ContactAliasResponse) {}
6767
rpc ContactAvatar (puppet.ContactAvatarRequest) returns (puppet.ContactAvatarResponse) {}
68+
rpc ContactPhone (puppet.ContactPhoneRequest) returns (puppet.ContactPhoneResponse) {}
6869

6970
rpc ContactList (puppet.ContactListRequest) returns (puppet.ContactListResponse) {}
7071

proto/wechaty/puppet/contact.proto

+8
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,11 @@ message ContactAvatarResponse {
7575
google.protobuf.StringValue filebox = 1;
7676
}
7777

78+
message ContactPhoneRequest {
79+
string contact_id = 1;
80+
repeated string phone_list = 2;
81+
}
82+
83+
message ContactPhoneResponse {
84+
repeated string phone_list = 2;
85+
}

tests/puppet-server-impl.ts

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ export const puppetServerImpl: IPuppetServer = {
3131
throw new Error('not implmented.')
3232
},
3333

34+
contactPhone: (call, callback) => {
35+
void call
36+
void callback
37+
throw new Error('not implemented.')
38+
},
39+
3440
contactSelfName: (call, callback) => {
3541
void call
3642
void callback

0 commit comments

Comments
 (0)