Esempio n. 1
0
    async def on_message_wrapper(on_new_message, text, queue, sender_id):
        collector = QueueOutputChannel(queue)

        message = UserMessage(text,
                              collector,
                              sender_id,
                              input_channel=RestInput.name())
        await on_new_message(
            message
        )  ## TODO  find details about this functions      # func sends message to core

        await queue.put("DONE")
Esempio n. 2
0
    async def on_message_wrapper(
        on_new_message: Callable[[UserMessage], Awaitable[None]],
        text: Text,
        queue: Queue,
        sender_id: Text,
    ) -> None:
        collector = QueueOutputChannel(queue)

        message = UserMessage(
            text, collector, sender_id, input_channel=RestInput.name()
        )
        await on_new_message(message)

        await queue.put("DONE")  # pytype: disable=bad-return-type
Esempio n. 3
0
 def url_prefix(self):
     return RestInput.name()
Esempio n. 4
0
 def url_prefix(self) -> Text:
     return RestInput.name()