Stream Chat official Python API Client
response = client.query_message_history(
filter={"message_id": {"$eq": msg_id}},
sort=[{"message_updated_at": -1}],
**{"limit": 1},
)
response_next = client.query_message_history(
filter={"message_id": {"$eq": msg_id}},
sort=[{"message_updated_at": -1}],
**{"limit": 1, "next": response["next"]},
)