If there is a & character in a message, Miscord chokes parsing it. #484
Comments
It's not a problem with the |
Just a heads up, The Lightspeed code seems to have made its way past iOS. Getting a very similar looking error message (which does also have source:chat:light_speed) intermittently when sending via the facebook.com/messenger on Windows Edge Chromium. I am using it via PWA, though from a quick glance I don't see anything that makes me suspect this behavior is any different due to using PWA over conventional browser. |
Yeah, the bad news is I'm seeing it now too with Chrome. |
Linked a Gist in the comment with a suggested fix (albeit a quick&dirty one) on an Issue in the libfb repo:
Yep, as expected same on the Edge Chromium PWA I use. Came in handy for testing at least :) |
With the fix listed above, is it possible to patch an existing instance? For example, in the container there is ./usr/local/lib/node_modules/miscord/node_modules/libfb/src/Client.ts. If I patch that file, is it possible to recompile libfb and then miscord? |
EDIT: I forgot that my own project was ported to TypeScript at some point 😅 |
You can edit the Client.ts when rebooting the miscord |
I built a custom docker image that includes the fix. My Dockerfile is attached for anyone that might want it. |
I'm running an instance in docker using that, I still get errors parsing messages from messenger |
I use the windows compiled version. I've included the fix in a local copy of the code, used tsc to compile the typescript to javascript and then used "npx pkg -t latest-win-x64 --public . -o ./build/miscord-5.0.4-win.exe" to create a new windows executable with the fix. It's working for me. |
Miscord version 5.0.4
Original message text (in Facebook) was "& where also Lucky Friends"
Resulting error:
Error while parsing the following message:
(▬qBa0CkBERfqqz+6fe1NmsQ{"deltas":[{"deltaNewMessage":{"messageMetadata":{"threadKey":{"threadFbId":2213615022018380},"messageId":"mid.$gAAfdRWkOj0x_MwXYvV5AcCQHdZsP","offlineThreadingId":6791551538120989455,"actorFbId":100045161614852,"timestamp":1619232067773,"shouldBuzzDevice":true,"tags":["source:chat:light_speed","app_id:437626316973788"],"threadReadStateEffect":2,"skipBumpThread":false,"unsendType":"deny_for_non_sender","cid":{"conversationFbid":2213615022018380}},"body":"& where also Lucky Friends","attachments":[],"data":{}}}],"firstDeltaSeqId":6263,"lastIssuedSeqId":6263,"queueEntityId":100065700634362}
The text was updated successfully, but these errors were encountered: