Telegram module #10

Merged
skobkin merged 19 commits from feature_telegram into master 2022-05-30 20:54:27 +00:00
Collaborator

telegram module. Closes #2 #7.

Two service classes:

  • Notifier class
  • CommandProcessor class

Two middlewares:

  • UserAuthMiddleware
  • ExceptionHandlerMiddleware

One exception for usage in the code called by the bot:

  • DisplayableException

Merge ONLY after #9 is merged.

`telegram` module. Closes #2 #7. Two service classes: * `Notifier` class * `CommandProcessor` class Two [middlewares](https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples/middleware): * `UserAuthMiddleware` * `ExceptionHandlerMiddleware` One exception for usage in the code called by the bot: * `DisplayableException` Merge **ONLY** after #9 is merged.
skobkin added this to the MVP 0.1 milestone 2022-05-01 23:45:43 +00:00
skobkin added the
new feature
label 2022-05-01 23:45:43 +00:00
skobkin self-assigned this 2022-05-01 23:45:43 +00:00
skobkin added 1 commit 2022-05-01 23:45:44 +00:00
skobkin added a new dependency 2022-05-01 23:45:57 +00:00
skobkin added a new dependency 2022-05-01 23:48:10 +00:00
skobkin added a new dependency 2022-05-01 23:52:06 +00:00
skobkin force-pushed feature_telegram from 01dda4fafe to aa75492716 2022-05-02 12:55:08 +00:00 Compare
skobkin force-pushed feature_telegram from aa75492716 to eba2ab2252 2022-05-02 14:55:45 +00:00 Compare
skobkin force-pushed feature_telegram from a3a38a856e to d39e046af2 2022-05-02 15:27:55 +00:00 Compare
skobkin force-pushed feature_telegram from 6c83447eb8 to ec6d707a56 2022-05-02 20:45:48 +00:00 Compare
skobkin force-pushed feature_telegram from ec6d707a56 to 74bd517238 2022-05-29 21:34:00 +00:00 Compare
skobkin force-pushed feature_telegram from 74bd517238 to 305f1afa3c 2022-05-29 21:36:34 +00:00 Compare
skobkin added 2 commits 2022-05-30 00:02:12 +00:00
skobkin force-pushed feature_telegram from 9e4488b204 to 3032c642be 2022-05-30 00:24:09 +00:00 Compare
skobkin force-pushed feature_telegram from 3032c642be to 882b4df5e1 2022-05-30 00:33:07 +00:00 Compare
skobkin changed title from WIP: Telegram package to WIP: Telegram module 2022-05-30 00:34:30 +00:00
skobkin added 1 commit 2022-05-30 00:35:18 +00:00
#7 Removing unnecessary statement.
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
af73458e29
skobkin changed title from WIP: Telegram module to Telegram module 2022-05-30 00:35:27 +00:00
skobkin requested review from Miroslavsckaya 2022-05-30 00:35:34 +00:00
Author
Collaborator

@Miroslavsckaya This PR is more or less ready. Check it out when you have time.

@Miroslavsckaya This PR is more or less ready. Check it out when you have time.
skobkin added the
refactoring
label 2022-05-30 00:38:04 +00:00
skobkin reviewed 2022-05-30 08:52:31 +00:00
@ -11,2 +10,3 @@
"""Create a database file if not exists."""
self.conn = sqlite3.connect(path)
# TODO: think about removing check_same_thread=False
self.conn = sqlite3.connect(path, check_same_thread=False)
Author
Collaborator

check_same_thread=False is a bad solution which can backfire on us in the future.

But I didn't see any other good solution at the time.

`check_same_thread=False` is a bad solution which can backfire on us in the future. But I didn't see any other good solution at the time.
skobkin added 2 commits 2022-05-30 19:58:56 +00:00
#7 Notifier now sends messages in HTML.
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
3bffd32df0
skobkin added 1 commit 2022-05-30 20:22:06 +00:00
#7 Notifier is now considering Telegram API sendMessage() rate limit.
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
f9ffdac38a
skobkin added 1 commit 2022-05-30 20:23:25 +00:00
#7 Notifier counter reset fix.
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
8554689fef
skobkin added 1 commit 2022-05-30 20:29:21 +00:00
#7 Notifier inconsistent naming fix.
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
54cdb3f368
Miroslavsckaya approved these changes 2022-05-30 20:52:00 +00:00
skobkin merged commit 2e44df0bbd into master 2022-05-30 20:54:27 +00:00
skobkin deleted branch feature_telegram 2022-05-30 20:54:27 +00:00
skobkin referenced this pull request from a commit 2022-05-30 20:54:27 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#2 Telegram API integration
Miroslavsckaya/tg_rss_bot
Depends on
#9 Python venv
Miroslavsckaya/tg_rss_bot
Reference: Miroslavsckaya/tg_rss_bot#10
No description provided.