refactor(account): update rpc_get_user_info with new fill_response template

This commit is contained in:
Changhua 2025-02-12 01:32:26 +08:00
parent 95e90e4afb
commit e121000efa

View File

@ -77,8 +77,8 @@ bool rpc_get_self_wxid(uint8_t *out, size_t *len)
bool rpc_get_user_info(uint8_t *out, size_t *len)
{
return fill_response<Functions_FUNC_GET_USER_INFO>(out, len, [](Response &rsp) {
static UserInfo_t ui = get_user_info();
UserInfo_t ui = get_user_info();
return fill_response<Functions_FUNC_GET_USER_INFO>(out, len, ui, [](Response &rsp, UserInfo_t &ui) {
rsp.msg.ui.wxid = (char *)ui.wxid.c_str();
rsp.msg.ui.name = (char *)ui.name.c_str();
rsp.msg.ui.mobile = (char *)ui.mobile.c_str();