def activate_project(self, update: Update, state): if not self.is_owner(update, state): return False DB.activate_project(state['p_id'], state['u_id'], state['a']) return True
def activate_project(self, update: Update, state): if update.callback_query is not None and update.callback_query.from_user.id != int(state['u_id']): update.callback_query.answer(text="Меню было вызвано другим пользователем.", show_alert=True) return False DB.activate_project(state['p_id'], state['u_id'], state['a']) return True