feat: 新增邀请入群
This commit is contained in:
1 parent
aaada266df
commit
80718a2af5
6 files changed
+1740
-1
No files matched your search
@@ -578,6 +578,19 @@ string Dispatch(struct mg_connection *c, struct mg_http_message *hm) {
|
||||
ret = ret_data.dump();
|
||||
break;
|
||||
}
|
||||
case WECHAT_INVITE_MEMBERS: {
|
||||
wstring room_id = GetWStringParam(j_param, "chatRoomId");
|
||||
vector<wstring> wxids = getArrayParam(j_param, "memberIds");
|
||||
vector<wchar_t *> wxid_list;
|
||||
for (unsigned int i = 0; i < wxids.size(); i++) {
|
||||
wxid_list.push_back(WS2LPWS(wxids[i]));
|
||||
}
|
||||
int success = g_context.chat_room_mgr->InviteMemberToChatRoom(
|
||||
WS2LPWS(room_id), wxid_list.data(), wxid_list.size());
|
||||
json ret_data = {{"code", success}, {"result", "OK"}};
|
||||
ret = ret_data.dump();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user