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

get statuses in client #357

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

hossinasaadi
Copy link
Contributor

  • add statuses response to client

Screen Shot 2022-02-11 at 6 28 07 PM

  • add sorted contacts

Screen Shot 2022-02-11 at 6 25 33 PM

  • update Whatsapp Web version to 2,2136,10

@hossinasaadi
Copy link
Contributor Author

Hi, @quad , @sigalor please check this out

@hossinasaadi
Copy link
Contributor Author

I’m working on listing statuses in client on new branch, so need this to merge @quad :D

Screen.Recording.2022-02-12.at.6.41.1.mov

@OmerFI
Copy link
Contributor

OmerFI commented Feb 26, 2022

Why do you use camel case? In Python, the convention is snake case.

@hossinasaadi
Copy link
Contributor Author

Hi @OmerFI , actually I’m following project structure :)

Comment on lines +186 to +198
try:
if processedData[1]['type'] is "contacts":
messageType = "jsonContacts";
processedData.append(self.sortedContacts(processedData))
except:
pass
# sort statuses
try:
if processedData[2][0][0] is "status":
processedData[2] = self.sortedStatuses(processedData)
messageType = "jsonStatuses";
except:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these exceptions caught as a result of, say, processedData[1]['type'] throwing IndexError or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, some responses don’t have a 'type' key, like 'action' response.
so sometimes it throws an error but try/except will handle that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are these exceptions caught as a result of, say, processedData[1]['type'] throwing IndexError or something?

@quad any problem ?

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.

None yet

3 participants