Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

Add message request support #301

Merged
merged 6 commits into from
Jul 21, 2016
Merged

Add message request support #301

merged 6 commits into from
Jul 21, 2016

Conversation

AllanWang
Copy link
Contributor

Full credits to QuickUnit's commit

I changed the description a bit and changed the type checks as mentioned here .

I tested it and it seems to be working.

I did not modify the getThreadInfo file. The indents just changed.

@@ -4,49 +4,58 @@ var utils = require("../utils");
var log = require("npmlog");

module.exports = function(defaultFuncs, api, ctx) {
return function getThreadInfo(threadID, callback) {
Copy link
Collaborator

@bsansouci bsansouci Jul 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you re-indent this back to 2 spaces

@bsansouci
Copy link
Collaborator

Looks good. Ready to merge when you fix the nitpicking. Thanks a lot!

@AllanWang
Copy link
Contributor Author

@bsansouci

if (utils.getType(accept) !== 'Boolean') {
            throw {
                error: "Please pass a boolean as a second argument."
            };
        }

Should that be != instead of !== as well?

@bsansouci
Copy link
Collaborator

Oh no it should always be !== and === except when you're comparing with null. Then you'd want to use != and ==. So in this case use !==.

@AllanWang
Copy link
Contributor Author

Can you check now?

I also kept it as

      } else if (utils.getType(pending) != 'Boolean') {
        throw {
          error: "Please pass a Boolean as a third argument."
        };
      } else {
        throw {
          error: "getThreadList: need callback"
        };
      }

Since you'll need to throw the last callback error if there is no boolean and no callback

@bsansouci bsansouci merged commit c7069a0 into Schmavery:master Jul 21, 2016
@bsansouci
Copy link
Collaborator

Sounds good. Thanks.

how2945ard pushed a commit to how2945ard/facebook-chat-api that referenced this pull request May 30, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants