Skip to content

Commit

Permalink
MessageLogger improved
Browse files Browse the repository at this point in the history
  • Loading branch information
lavadk committed Apr 16, 2021
1 parent 964e55f commit c5947d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions liker/setup/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
LONG_POLLING_TIMEOUT = 1

MESSAGES_LOG_PREFIX = 'messages'
MESSAGES_LOG_CHAT_TYPES = ['private']

CHANNEL_POST_HANDLER = 'cph'

Expand Down
3 changes: 2 additions & 1 deletion liker/setup/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def bind_app_dependencies(binder: Binder):
lambda: MessagesLogger(dir_path=constants.messages_log_dir(),
file_name_prefix=constants.MESSAGES_LOG_PREFIX,
command_parser=inject.instance(CommandHub).parser,
hasher=inject.instance(Hasher)))
hasher=inject.instance(Hasher),
chat_types=constants.MESSAGES_LOG_CHAT_TYPES))
binder.bind_to_constructor(TelegramInboxHub,
lambda: TelegramInboxHub(telegram_cursor=inject.instance(TelegramCursor),
chain_handlers=[inject.instance(CommandHub),
Expand Down
2 changes: 1 addition & 1 deletion tengine

0 comments on commit c5947d7

Please sign in to comment.