Open motiwalam opened 2 years ago
This might be because the capabilities of the client aren't updated.
Can you direct me to as to where I should start on fixing this?
Okay, I've got it working. I'll issue a pull request sometime later, but until then I'll detail the changes I made for anyone else who has this problem.
First, I updated the capabilitiesHeader
to be the one used by my app. It is now 3brTv10=
.
Then, I updated the app constants to be the one used by my app. These are now:
APP_VERSION = '219.0.0.12.117'
APP_VERSION_CODE = '346138365'
Now, the real problem is that, given these app constants, the server expects a different authorization system. Cookies are no longer used: instead, the server sends custom headers that contain the relevant information.
Updating the codebase to reflect this change will probably require a lot more changes, but so far, it seems the bare minimum is the following:
authorization=${this.ig.state.authorization}
return this.dsUserId
;ig-set-ig-u-ds-user-id
header and use its value to set the dsUserId on this.client.state
uid
is undefined. This is so the catch statement fires.I believe that's all. I also changed the BLOKS_VERSION_ID
constant but am unsure if that makes a difference.
Needless to say, these are really quite hacky changes, and I will be working on fully updating the codebase. I am not yet fully acquainted with all the code though, so I'd appreciate any pointers you have as to where and how to update everything.
I am also not entirely sure if this is everything needed. Since the cookie jar is now perpetually empty, any other calls to extract something from the cookie jar will result in an error. It hasn't caused a problem in my use cases so far, but I have not done exhaustive testing.
Until then, it seems that, having done this, the message events emitted by the realtime client will now contain the "replied_to_message" field if such a field exists. Presumably, other events will also be updated.
When replying to a message, there should be a "replied_to_message" field that is not present when listening with this API.
I know the field should be present because I see it in the browser.
I also know the field is actually missing and not just discarded in the parsing process because I am listening for messages emitted at "/ig_message_sync" (this is also the path the browser listens at) directly through the mqtt client and the field is still absent.
Any ideas on why this field is missing?