Introduce internal API call queuing mechanism #43
No reviewers
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: thereadme/node-telegram-api#43
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Introduce internal API call queuing mechanism to send messages sequentially (no more random order)
Thank you for the merge of my previous PR and super quick turnaround :).
This PR will be probably the most wanted feature from this module for my BE app :). Queuing! 👏
Thanks! This is definitely a welcome improvement, there is a single detail I've commented below
Why not wrap this function inside the promise, so you don't have to hold references to
resolve
andreject
.You are right, after re-running same test file that sends out multiple messages got same result without any issues. Appears there's no negative impact reducing this code excerpt you suggested 👍
Added your suggestions in a new commit
Looks good to me, just to make sure, have you tested this thoroughly? Asking since this can have implications on most parts of the application. If so, good to go by me, thanks a lot! :D
I have tested it out with simple Messages, no document uploads etc. But from the tests I've done, it worked like a charm for me.
Could you please put some time to test other types of messages just to make sure? I would be grateful 🙏
As every API method is just a wrapper for API.request method, and param count to it remains the same, I see no reason other child classes of Base should behave differently. I haven't dealt with sending docs etc via Telegram API before. Could be a possibility for you to test this out quicker than me by any chance? :)
I guess you are right, since the change only affects the way the method is called rather than processed, it shouldn't make any difference among different types of messages.
Thanks a lot Laurynas! 👍
🎉
Published
telegram-api@4.0.0
🎉👍