Skip to content

Commit

Permalink
fix generic input response
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelba committed Mar 8, 2021
1 parent ca802b0 commit cc4a8e4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions bot/events/Message.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,8 @@ def reorder_questions(user) -> Any:


def generic_input(event, user: User, is_room) -> Any:
text = ''
if is_room:
text = NO_ANSWER
else:
text = NO_ANSWER
if not is_room:
previous_question = Storage.get_previous_question(google_id=user.google_id)
if previous_question:
logger.debug(f"Previous question: {previous_question.id_}, {previous_question.question}, "
Expand All @@ -223,6 +221,4 @@ def generic_input(event, user: User, is_room) -> Any:
return json.jsonify({'cards': [card]})
else:
text = f"_{next_question.question}_"
else:
text = NO_ANSWER
return json.jsonify({'text': text})

0 comments on commit cc4a8e4

Please sign in to comment.