Support forced fetch#628
Conversation
| return graphQLBatch(ctx, defaultFuncs, query) | ||
| .then(function(resData) { | ||
| // TODO@ Figure out how to get the correct thread type | ||
| return formatMessageGraphQLResponse(threadID, undefined, resData.message); |
There was a problem hiding this comment.
Currently I use undefined for threadType, so isGroup flag will always be false. Is there an easy way to get threadType without making an extra network call?
|
This is starting to affect more common types of messages including some regular shares, not just messages with buttons. @Schmavery, what do you think about this? |
|
Sorry I missed this everyone. I'm not against merging something like this if it's still useful. In the future, it's easier to review a large PR like this the moving of existing code to another file is one commit on its own, without any modifications (even if it doesn't run properly). Then the other commit(s) afterward can modify it. Then I don't need to remember which parts are copied and which parts are modified. Thanks for making an effort to split the PR into two commits on this one, but it seems like there was still a large code move + changes in the first commit. |
Recently FB changes the API and it seems now a complex message (e.g. a message with buttons) is not returned directly and has to be loaded via /api/graphqlbatch
a342b85 to
10ed5ca
Compare
|
@Schmavery, I agree, it is hard to review it as is. I split the commits. Now it should be easier to review. I don't use this project and facebook for around a year and not even sure my change still makes sense and works as expected. It would be nice if someone else finishes it if it is useful. |
Recently (a few days ago) Facebook changed the API again and now a complex message (e.g. a message with a button) is not returned directly anymore, but has to be loaded via /api/graphqlbatch.
Without this change, the library simply skips the message.
Traffact example.
Send the following message using official messenger API:
Facebook Web Messenger traffic:
ForcedFetch, no message itself:URL: https://www.messenger.com/api/graphqlbatch
Query:
https://www.messenger.com/ajax/mercury/delivery_receipts.phpThe change is not small... I tried to split it on two commits for easy review: