-
Notifications
You must be signed in to change notification settings - Fork 807
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
base: master
Are you sure you want to change the base?
Conversation
hossinasaadi
commented
Feb 11, 2022
- add statuses response to client
- add sorted contacts
- update Whatsapp Web version to 2,2136,10
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 |
Why do you use camel case? In Python, the convention is snake case. |
Hi @OmerFI , actually I’m following project structure :) |
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ?