Remove automatic fb_dtsg refreshing
This was error prone, inefficient and wouldn't handle all error cases. The real solution is to make some way to retry the request in the general case (since you can alway just get logged out), and that's probably out of scope for this project, at least right now. :/
This commit is contained in:
@@ -817,6 +817,7 @@ class Client:
|
||||
image_id = str(image_id)
|
||||
data = {"photo_id": str(image_id)}
|
||||
j = self._post("/mercury/attachments/photo/", data)
|
||||
_util.handle_payload_error(j)
|
||||
|
||||
url = _util.get_jsmods_require(j, 3)
|
||||
if url is None:
|
||||
@@ -2017,6 +2018,7 @@ class Client:
|
||||
"https://{}-edge-chat.facebook.com/active_ping".format(self._pull_channel),
|
||||
data,
|
||||
)
|
||||
_util.handle_payload_error(j)
|
||||
|
||||
def _pullMessage(self):
|
||||
"""Call pull api to fetch message data."""
|
||||
@@ -2028,9 +2030,11 @@ class Client:
|
||||
"clientid": self._state._client_id,
|
||||
"state": "active" if self._markAlive else "offline",
|
||||
}
|
||||
return self._get(
|
||||
j = self._get(
|
||||
"https://{}-edge-chat.facebook.com/pull".format(self._pull_channel), data
|
||||
)
|
||||
_util.handle_payload_error(j)
|
||||
return j
|
||||
|
||||
def _parseDelta(self, m):
|
||||
def getThreadIdAndThreadType(msg_metadata):
|
||||
|
Reference in New Issue
Block a user