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
How can i get phone numbers profile image and status? #26
Comments
Please someone can do this? |
For getting profile picture from app.mac import mac, signals
@signals.message_received.connect
def handle(message):
# callback parameter optional
def pp(who, path):
print("Got profile", who, path)
# preview parameter also optional
mac.contact_picture(message.conversation, pp, preview=False)
# if you want to specify the number:
mac.contact_picture_from("521123456789" pp, preview=False) |
def sago(message): Error: File "/home/ubuntu/workspace/whatsapp-framework/app/mac/mac.py", line 191, in contact_picture_from |
@danielcardeenas fix. false: true: |
Yeah i just fixed it. Please pull again |
To get statuses: def ss(statuses):
print(statuses)
mac.contact_status(message.who, ss)
mac.contact_status_from("5211234567890", ss) Outputs: Also supports sending a list of contacts (normalized number jids or list of |
Daniel can you please add one example to use this directly without chat bot. |
I'm not sure what you mean. @signals.initialized.connect
def connected(entity):
def callback(status):
print(status)
mac.contact_status(message.who, callback)
mac.contact_status_from("5211234567890", callback) ? |
@danielcardeenas |
Ah I understand. I need to rewrite mac as a library for this. |
okey thank you for this amazing work. have a nice day. |
@danielcardeenas how can I save the contact picture without bot conversation? |
How can i get phone numbers profile image and status? Any function?
The text was updated successfully, but these errors were encountered: