Esempio n. 1
0
 def workflow_connector(self, update, context):
     connector = update.callback_query.data
     Session.del_from(context.user_data)
     session = Session.get_from(context.user_data)
     if connector == str(self.CALLBACK_ODOO_CONNECTOR):
         session.sign_handler = OdooSignHandler(self) 
         session.hey_wallet_handler = OdooHeyWalletHandler(self)
         session.datasource = Odoo()
     else:
         session.sign_handler = None
         session.hey_wallet_handler = None
         session.datasource = None
     
     Session.set_from(context.user_data, session)
     
     if session.sign_handler:
         return session.sign_handler.workflow_connector(update, context)
     
     return self.sign_handler.workflow_connector(update, context)
Esempio n. 2
0
 def cancel(self, update, context):        
     text = '🙋‍♂️ Bye! I hope we can talk again someday ... or /start'
     Session.del_from(context.user_data)
     self.reply_text(update, context, text=text, reply_markup=ReplyKeyboardRemove())
     return self.END