11
Development / Re: Discord
« Last post by dartraiden on 08 05 2025, 12:52:15 »Code: [Select]
void CDiscordProto::OnReceiveHistory(MHttpResponse *pReply, AsyncHttpRequest *pReq)
{
CDiscordUser *pUser = (CDiscordUser*)pReq->pUserInfo;
JsonReply root(pReply);
if (!root) {
if (root.error() == 403) // forbidden, don't try to read it anymore
setByte(pUser->hContact, DB_KEY_DONT_FETCH, true);
return;
}
i.e. if the server refused to send the history once for some reason (error 403), then we create a "don't try to fetch again" key for the contact so as not to irritate server (the server really doesn't like it when the client makes requests that are strange from its point of view, so the fewer unsuccessful requests we make, the less risk we have of being banned)
you can try to delete this key via Database Editor and try to load history again