Past conversation retrieval for a given sender id

I have a requirement to check if a user has left a conversation midway. If the user comes back again, the bot should retrieve the conversations that happened within the last 24 hours and then ask the user whether to continue from that point or it should start a fresh conversation.

I dug through the rasa code and my observations are as follows:

  1. An agent class object is created when the first message is sent by the user.
  2. This agent object invokes the handle_message method of the processor.
  3. handle_message method restores the tracker based on sender_id.
  4. During the restoration of the tracker, all the conversations are picked up from the tracker store.

Is there a way to pick conversations for the past 24 hours only instead of loading all the conversations in Rasa?

Why do you have to only pull logs from the last 24 hours, is it just a performance issue? If there was a restart anywhere in the last 24 hours, the tracker state would be the same regardless of if you picked up the last 24 hours or the entire tracker. If there wasn’t a restart, then restricting the context to only the events of the last 24 hours might mess up the context, as you’d be excluding the beginning of the conversation.

My requirement is to ask the user to continue with the half-completed story if the user has left a story unfinished. Since I couldn’t find any solution to that, I want to pick up events in the last 24 hours and then by-default ask the user if she wants to continue from where she left.

Can this be done in Rasa?