diff --git a/rasa/core/events/__init__.py b/rasa/core/events/__init__.py index 9282f1121a1d..1a3f566ad151 100644 --- a/rasa/core/events/__init__.py +++ b/rasa/core/events/__init__.py @@ -346,13 +346,16 @@ def apply_to(self, tracker: "DialogueStateTracker") -> None: @staticmethod def create_external( - intent_name: Text, entity_list: Optional[List[Dict[Text, Any]]] = None + intent_name: Text, + entity_list: Optional[List[Dict[Text, Any]]] = None, + input_channel: Optional[Text] = None, ) -> "UserUttered": return UserUttered( text=f"{EXTERNAL_MESSAGE_PREFIX}{intent_name}", intent={INTENT_NAME_KEY: intent_name}, metadata={IS_EXTERNAL: True}, entities=entity_list or [], + input_channel=input_channel, ) diff --git a/rasa/core/processor.py b/rasa/core/processor.py index 1926f2c88672..b58607e80641 100644 --- a/rasa/core/processor.py +++ b/rasa/core/processor.py @@ -390,7 +390,11 @@ async def trigger_external_user_uttered( f"Invalid entity specification: {entities}. Assuming no entities." ) entity_list = [] - tracker.update(UserUttered.create_external(intent_name, entity_list)) + tracker.update( + UserUttered.create_external( + intent_name, entity_list, input_channel=output_channel.name() + ) + ) await self._predict_and_execute_next_action(output_channel, tracker) # save tracker state to continue conversation from this state self._save_tracker(tracker)