mirror of
https://github.com/EvolutionAPI/evolution-client-python.git
synced 2025-07-13 07:04:49 -06:00
feat: add get_messages method to retrieve chat messages by remote JID
This commit is contained in:
parent
82c0ad0363
commit
37320e247b
@ -66,4 +66,13 @@ class ChatService:
|
||||
f'chat/sendPresence/{instance_id}',
|
||||
data=data.__dict__,
|
||||
instance_token=instance_token
|
||||
)
|
||||
)
|
||||
|
||||
def get_messages(self, instance_id: str, remote_jid: str, instance_token: str):
|
||||
'''Get messages from a chat'''
|
||||
payload = {"where": {"key": {"remoteJid": remote_jid}}}
|
||||
return self.client.post(
|
||||
f'chat/findMessages/{instance_id}',
|
||||
data=payload,
|
||||
instance_token=instance_token,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user