We have a use case where we have the message ID of a draft and want to get the immutable draft ID. Currently the only way to do this is to list all the drafts and iterate through them until we find a matching message id.
Would it be possible to add functionality to query the drafts by message ID? Alternatively, if the draft ID could be included with a Get message by ID call then that could work to.
This isn't possible now and seems like an odd edge case. What's the downside of iterating all drafts.list? I imagine 99% there's < 50 drafts so it should be relatively cheap/efficient.
If there are a lot of drafts or some other reason you don't want to look at all of the drafts the best workaround I'd say is:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With