railsware / mailtrap-nodejs

Official mailtrap.io Node.js client
https://mailtrap.io
MIT License
58 stars 7 forks source link

Feature request: messagesClient.get with an option to filter only those that are unread #37

Closed poponuts closed 6 months ago

poponuts commented 6 months ago

Would it be possible to have the following function with an optional parameter of { isRead: false } which basically only grabs messages that are unread (or vice-versa if true)? const messages = await messagesClient.get(firstInboxId); // gets all messages in the inbox

I find this function very useful too so it would be good to follow a similar pattern: const messagesRead = await messagesClient.updateMessage(firstInboxId, firstMessageId, { isRead: true }); // marks latest message as read

VladimirTaytor commented 6 months ago

Hey, thanks for using Mailtrap 🙇‍♂️

In general it's pretty good idea and UX improvement, but after some discussion in the team we can say that in the nearest future we don't plan to implement it

I'll leave feature request label, so we might return to it when planning Testing product improvements 👌