Hello, I implemented such a mechanism and encountered difficulties, but fortunately, everything was resolved except for one problem. Are there any ways to validate the code before sending it to the server to avoid a 5-hour ban after 10 incorrect codes? It often happens that an invalid code is encountered, leading to a 5-hour block. Have you found any solutions to this problem, or did you not encounter such difficulties?
there are 4 types of msgType, "TEXT", "IMAGE", "SEND_RED_ENVELOPE", "GRAB_RED_ENVELOPE". you should filter the messages by msgType == "SEND_RED_ENVELOPE" || msgType == "GRAB_RED_ENVELOPE", and then you can find the grabCode in the msgPayload, the grabCode is always correct. you should never try to parse the grabCode from normal user-send text message, some bad guys send fake gift box text message sometimes, and it will block you from grabing the gift box for few hours. there is no way to pre-check the grabCode is correct or not.
Hello, I implemented such a mechanism and encountered difficulties, but fortunately, everything was resolved except for one problem. Are there any ways to validate the code before sending it to the server to avoid a 5-hour ban after 10 incorrect codes? It often happens that an invalid code is encountered, leading to a 5-hour block. Have you found any solutions to this problem, or did you not encounter such difficulties?
there are 4 types of msgType, "TEXT", "IMAGE", "SEND_RED_ENVELOPE", "GRAB_RED_ENVELOPE". you should filter the messages by msgType == "SEND_RED_ENVELOPE" || msgType == "GRAB_RED_ENVELOPE", and then you can find the grabCode in the msgPayload, the grabCode is always correct. you should never try to parse the grabCode from normal user-send text message, some bad guys send fake gift box text message sometimes, and it will block you from grabing the gift box for few hours. there is no way to pre-check the grabCode is correct or not.
Is it working now?
yes, it still working, any questions are welcome, but i won't provide the full scripts.
I need you help.