Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@account_hookimpl
def ac_incoming_message(self, message):
if message.chat == self.bot_chat:
self._replies.put(message)
@account_hookimpl
def ac_message_delivered(self, message):
self.logger.info("message id={} chat={} delivered to smtp".format(
message.id, message.chat.id))
@account_hookimpl
def ac_incoming_message(self, message):
# we always accept incoming messages to remove the need for
# bot authors to having to deal with deaddrop/contact requests.
message.accept_sender_contact()
self.logger.info("incoming message from {} id={} chat={} text={!r}".format(
message.get_sender_contact().addr,
message.id, message.chat.id, message.text[:50]))
# message is now in fresh state, schedule a check
self._checks.put(CheckAll(self.bot))