diff --git a/rpc/proto/wcf.proto b/rpc/proto/wcf.proto index 8628c17..2b8d8f1 100644 --- a/rpc/proto/wcf.proto +++ b/rpc/proto/wcf.proto @@ -10,7 +10,7 @@ service Wcf { rpc RpcEnableRecvMsg(Empty) returns (stream WxMsg) {} rpc RpcDisableRecvMsg(Empty) returns (Response) {} rpc RpcSendTextMsg(TextMsg) returns (Response) {} - rpc RpcSendImageMsg(ImageMsg) returns (Response) {} + rpc RpcSendPathMsg(PathMsg) returns (Response) {} rpc RpcGetMsgTypes(Empty) returns (MsgTypes) {} rpc RpcGetContacts(Empty) returns (Contacts) {} rpc RpcGetDbNames(Empty) returns (DbNames) {} @@ -44,7 +44,7 @@ message Request Empty empty = 2; string str = 3; TextMsg txt = 4; - ImageMsg img = 5; + PathMsg file = 5; DbQuery query = 6; Verification v = 7; } @@ -87,7 +87,7 @@ message TextMsg string aters = 3; // 要@的人列表,逗号分隔 } -message ImageMsg +message PathMsg { string path = 1; // 要发送的图片的路径 string receiver = 2; // 消息接收人 diff --git a/spy/rpc_server.cpp b/spy/rpc_server.cpp index 9bfc77e..0f28677 100644 --- a/spy/rpc_server.cpp +++ b/spy/rpc_server.cpp @@ -395,7 +395,7 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len } case Functions_FUNC_SEND_IMG: { LOG_INFO("[Functions_FUNC_SEND_IMG]"); - ret = func_send_img(req.msg.img.path, req.msg.txt.receiver, out, out_len); + ret = func_send_img(req.msg.file.path, req.msg.file.receiver, out, out_len); break; } case Functions_FUNC_ENABLE_RECV_TXT: {