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")
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
def url_prefix(self): return RestInput.name()
def url_prefix(self) -> Text: return RestInput.name()