Struggling to handle Direct Messages #654
Unanswered
kahnbenjamina
asked this question in
Questions
Replies: 1 comment
|
Hello! Get messages with cursor based pagination should solve your needs All chat conversation models: https://atproto.blue/en/latest/atproto/atproto_client.models.chat.bsky.convo.html Get messages params and response: https://atproto.blue/en/latest/atproto/atproto_client.models.chat.bsky.convo.get_messages.html Get messages method in the namespace: https://atproto.blue/en/latest/atproto_client/namespace.html#atproto_client.namespaces.sync_ns.ChatBskyConvoNamespace.get_messages |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello!
I am currently writing a bot with the goal of pulling all messages sent to an account over a specific time period. The documentation regarding the Python handling of direct messages is pretty limited, but I've gotten to the point where I can get the most recent message sent in each convo like so:
Output:
However, in the event of someone sending more than one message in the given time period, I can't seem to figure out a way to retrieve all messages sent, not just the most recent one.
When I run the following code, I receive a list of variables including that last_message field, but seemingly no way of accessing messages prior to that.
Output:
My question is if the functionality I'm describing is available/possible with the atproto API and if so, where would I find documentation about it? Thanks in advance for any help!
All reactions