version: 0.0.7

This commit is contained in:
Davidson Gomes
2025-01-06 12:23:49 -03:00
parent 69112cd4c4
commit f14781cdb6
10 changed files with 56 additions and 2 deletions

View File

@@ -66,4 +66,17 @@ 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, page: int = 1, offset: int = 50):
'''Get messages from a chat'''
payload = {
"where": {"key": {"remoteJid": remote_jid}},
"page": page,
"offset": offset,
}
return self.client.post(
f'chat/findMessages/{instance_id}',
data=payload,
instance_token=instance_token,
)