Commit Graph

30 Commits

Author SHA1 Message Date
Mahdi Dibaiee
0658bced4d
Merge pull request #47 from laurynas-karvelis/feature/prevent-event-listener-overflow
feature: add event listeners to get answers from Base.send method only when explicitly asked
2018-12-24 12:00:50 +00:00
Laurynas Karvelis
45a7251917 chore: remove redundant param addition inside Question.send 2018-12-24 13:57:39 +02:00
Laurynas Karvelis
68eb5e5483 fix: default param value to true to avoid breaking people's existing code; small return value fix 2018-12-24 13:56:33 +02:00
Laurynas Karvelis
468354f6a8 feature: allow sending silent notifications 2018-12-24 13:51:28 +02:00
Laurynas Karvelis
896ef4e84c feature: add event listeners to get answers from Base.send method only when explicitly asked 2018-12-24 11:43:57 +02:00
Mahdi Dibaiee
5b7c636aed style: split comment to two lines 2018-04-20 16:03:42 +04:30
Laurynas Karvelis
abf965c0f2 Don't add 'getUpdates' request to the queue as it's going to hinder 'send*' calls performance 2018-04-20 13:36:48 +03:00
Laurynas Karvelis
465eca0c5e Reduce code complexity 2018-03-21 16:39:59 +02:00
Laurynas Karvelis
8d280e157c Introduce internal API call queueing mechanism to send messages sequentially (no more random order) 2018-03-21 14:39:46 +02:00
Laurynas Karvelis
f6beebe241 Mount bot.on('update') event listener only if message was sent out successfully; Reset one time keyboard after api.send request has been done 2018-03-21 13:29:05 +02:00
Laurynas Karvelis
e29d2d3600 Refactor api.send Message related logic into a separate private method 2018-02-27 18:18:59 +02:00
Laurynas Karvelis
530a6b8800 Allow sending messages longer than 4096 chars 2018-02-27 14:02:57 +02:00
Laurynas Karvelis
a404e2ee82 Emit bot errors inside inner catch promise chain handlers 2018-02-18 12:40:21 +02:00
Laurynas Karvelis
6e2a728e76 Recover from http error with telegram server and carry on fetching updates 2018-02-16 02:26:06 +02:00
Laurynas Karvelis
790f988148 Reject Promise at Base.send() method if api request got rejected 2018-02-05 16:35:22 +02:00
Laurynas Karvelis
92f892a467 Do not try to eat up request errors with catch as this will break rejection chain 2018-02-05 16:33:45 +02:00
Laurynas Karvelis
ddc588899d Fix edge case when message object is undefined 2018-02-01 17:02:59 +02:00
Ali Movahedi
9c7adddb0a perf: remove if for checking customMessage 2017-09-12 20:26:28 +04:30
Ali Movahedi
5754b24912 style: remove extra white space 2017-09-12 18:41:39 +04:30
Ali Movahedi
bc5f14ebde fix: move optional argument to end 2017-09-12 18:39:09 +04:30
Ali Movahedi
88af10a8b4 feat: customizable message for required params 2017-09-12 13:39:58 +04:30
Ali Movahedi
65900e3252 feat: add Delete type 2017-09-12 11:10:13 +04:30
Austin Huang
222c00ba20 Added edited_channel_post. 2016-12-14 10:09:14 -05:00
Austin Huang
2cc18a3eb8 Update index.js 2016-11-22 13:39:07 -05:00
Mahdi Dibaiee
12ffd75527 fix(edited_message): new updated messages have an edited_message property instead of message. 2016-05-27 11:56:05 +04:30
eden lane
4ddcb20807 fix(babel): replace window with global
I'm pretty sure that here should be `global` instead of `window`.
Does `window` work for you? I have a ReferenceError.
2016-04-19 11:58:30 +03:00
Mahdi Dibaiee
ef12125190 fix(babel): don't require babel-polyfill if it's already required 2016-04-16 18:04:19 +04:30
Mahdi Dibaiee
c76eb0c64d chore(lint): update eslint configuration, re-lint
chore(gitignore): don't ignore src/types
2016-03-28 20:40:59 +04:30
Ali Movahedi
23cff62505 style: lint code
lint code on files: index.js, poll.js and argument-parser.js
2016-03-28 12:30:54 +04:30
Ali Movahedi
e5c25bd9c1 refactor: remove grunt and babel
remove grunt from dependencies, and use transformed code instead using babel/register.
change API a litte
2016-03-28 12:26:07 +04:30