tock / ai.tock.bot.engine.user / UserTimelineDAO / loadWithLastValidDialog

loadWithLastValidDialog

abstract fun loadWithLastValidDialog(namespace: String, userId: PlayerId, priorUserId: PlayerId? = null, groupId: String? = null, storyDefinitionProvider: (String) -> StoryDefinition): UserTimeline (source)

Loads with last dialog. If no timeline exists, creates a new one.

Parameters

namespace - the namespace of the bot

userId - the user id of the last message

priorUserId - not null if this user has an other id before

groupId - not null if this is a conversation group

storyDefinitionProvider - provides StoryDefinition from story ids.