Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #365 #366

Merged
merged 2 commits into from
Dec 10, 2018
Merged

Fix for issue #365 #366

merged 2 commits into from
Dec 10, 2018

Conversation

kaushalvivek
Copy link
Contributor

Instead of keeping the results for a search query limited to 1, increased it to 10.

Line changed:
https://github.com/carpedm20/fbchat/blob/89a277c3541e5b5a5a1b4c1dd6aaf9025ce43707/fbchat/client.py#L505

@madsmtm
Copy link
Member

madsmtm commented Dec 7, 2018

Thanks for your contribution, and don't mind the broken tests.

Would it make sense to increase the limit on searchForPages, searchForGroups and searchForThreads equivalently?

@kaushalvivek
Copy link
Contributor Author

@madsmtm , I would say yeah. Two people/threads/pages might have the same name (as is for a lot of Indian names :P), and this does render searching futile when only one object is being returned. A limit of 3, 5 or 10, would be the best balance between being pragmatic and maintaining usability at the same time. That's just my opinion.

@madsmtm
Copy link
Member

madsmtm commented Dec 9, 2018

This would technically be a breaking change if people were doing something like:

try:
    user, = client.searchForUsers("abc")
except:
    pass  # Assume the user couldn't be found

But that's bad usage of the method anyhow, so I don't think it'll be a problem.

I'll merge this once you've updated the limit on searchForPages, searchForGroups and searchForThreads as well :)

@kaushalvivek
Copy link
Contributor Author

Have updated the limits on searchForPages, searcForGroups and searchForThreads to 10 as well, also looked at why it was failing tests.

@madsmtm
Copy link
Member

madsmtm commented Dec 10, 2018

Thanks 👍

@madsmtm madsmtm merged commit 2f8d072 into fbchat-dev:master Dec 10, 2018
@AuroraRin
Copy link

Emergency !!!!! Can any one help me out with the sendLocalVoiceClip, when I run the code it keeps saying that:
'FacebookMess' object has no attribute 'sendLocalVoiceClips'
Ps: My fbchat is 1.6.3. Thanks in advance~

@madsmtm
Copy link
Member

madsmtm commented Feb 26, 2019

Hi @AuroraRin, I'm sorry to hear that you're having trouble, and would love to help you out! Unfortunately, this is not the correct place to discuss the issue. Please create a dedicated bug report, and attempt to fill in as much information as you can, then I'll get back to you 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants