Next chapter for diversion only on Timeout diversion

This commit is contained in:
Ruben van de Ven 2019-04-26 13:34:17 +02:00
parent bf12323f41
commit 23cf100df7

View file

@ -535,10 +535,7 @@ class Diversion(object):
story.logger.info(f"Diverge: No response {self.id} {story.stats}") story.logger.info(f"Diverge: No response {self.id} {story.stats}")
# fall back to the next message to return on. self.returnMessage = msgTo
# TODO: maybe, if not chapter is found, the diversion should be
# blocked alltogether?
self.returnMessage = story.getNextChapterForMsg(msgTo) or msgTo
await story.setCurrentMessage(msg) await story.setCurrentMessage(msg)
story.currentDiversion = self story.currentDiversion = self
@ -586,10 +583,7 @@ class Diversion(object):
story.logger.critical(f"Not a valid message id for diversion: {self.params['msgId']}") story.logger.critical(f"Not a valid message id for diversion: {self.params['msgId']}")
return return
# fall back to the next message to return on. self.returnMessage = msgTo
# TODO: maybe, if not chapter is found, the diversion should be
# blocked alltogether?
self.returnMessage = story.getNextChapterForMsg(msgTo) or msgTo
await story.setCurrentMessage(msg) await story.setCurrentMessage(msg)
story.currentDiversion = self story.currentDiversion = self
return True return True