Anti-flooding
Implement anti-flooding measures for text chat.
Read time 1 minuteLast updated 7 months ago
Set rate limiting by configuring the pre-login parameter . Setting it to 0 disables the feature.
MaxTextMessageRateRate limiting is enforced by the Vivox SDK. If a user tries to send messages at a rate higher than allowed, a error is returned.
VxErrorMessageTextRateExceededvx_req_account_send_msg *req;vx_req_account_send_msg_create(&req);req->connector_handle = vx_strdup("c1");req->account_handle = vx_strdup(".issuer-w-dev.mytestaccountname.");req->language = vx_strdup(“en-us”);req->user_uri = vx_strdup("sip:theotheruser@vd1.vivox.com");req->message_body = vx_strdup("Hey there buddy!");int status = vx_issue_request2(&req->base); // If rate limiting is surpassed, status = VxErrorMessageTextRateExceeded