feat: 用户信息增加别名

This commit is contained in:
HuChundong
2025-04-02 00:32:25 +08:00
parent 59bccbb931
commit 72361fe932
4 changed files with 8 additions and 3 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <map>
#include <string>
@@ -55,6 +55,7 @@ typedef struct {
string name;
string mobile;
string home;
string alias;
} UserInfo_t;
typedef struct {
+2 -1
View File
@@ -1,4 +1,4 @@
syntax = "proto3";
syntax = "proto3";
package wcf;
option java_package = "com.iamteer";
@@ -178,6 +178,7 @@ message UserInfo
string name = 2; // 昵称
string mobile = 3; // 手机号
string home = 4; // 文件/图片等父路径
string alias = 5; // 修改后的wxid
}
message DecPath
+2
View File
@@ -82,6 +82,7 @@ UserInfo_t get_user_info()
ui.home = get_home_path().generic_string();
ui.name = get_string_value(service_addr, OsAcc::NAME);
ui.mobile = get_string_value(service_addr, OsAcc::MOBILE);
ui.alias = get_string_value(service_addr, OsAcc::ALIAS);
return ui;
}
@@ -104,6 +105,7 @@ bool rpc_get_user_info(uint8_t *out, size_t *len)
rsp.msg.ui.name = (char *)ui.name.c_str();
rsp.msg.ui.mobile = (char *)ui.mobile.c_str();
rsp.msg.ui.home = (char *)ui.home.c_str();
rsp.msg.ui.alias = (char *)ui.alias.c_str();
});
}
+2 -1
View File
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <cstdint>
@@ -13,6 +13,7 @@ namespace Account
constexpr uint64_t NAME = 0x1E8; // 昵称
constexpr uint64_t MOBILE = 0x128; // 手机号
constexpr uint64_t LOGIN = 0x7F8; // 登录状态
constexpr uint64_t ALIAS = 0x108; // 修改后的WXID
}
namespace Chatroom