Closed zs-codex closed 2 years ago
With the latest release, to get the last message I believe you can set the order
to desc
and limit
to 1.
params := &conversationsV1.ListConversationMessageParams{}
params.SetOrder("desc")
params.SetLimit(1)
resp, err := client.ConversationsV1.ListConversationMessage("ConversationSid", params)
To get a count, not sure there is a more intuitive way other than just list
all the messages and count them. Let me know if this helps at all. API reference here
Thank you @shwetha-manvinkurke
Issue Summary
Is there an API to get the last message that was sent to a conversation?
We're looking for a way to get (a rough) count of the number of messages in a conversation.
Technical details: