protected override async Task Handle(IHandleContext context, RegisterBotProcessingMessage message)
        {
            await botManager.GetBotAsync(message.BotEngine, message.BotKey);

            MasterProcessId     = message.MasterProcessId;
            ChatProcessIdentity = message.ChatProcessIdentity;
            CorrelationId.Value = message.CorrelationId.Value;
        }
Beispiel #2
0
        public async Task <(string body, string type)> HandleAsync(string body, string path)
        {
            var pathes = path.Split('/');
            var bot    = await botManager.GetBotAsync(engine, pathes[0]);

            var proc = new MessageProcessor(bus, engine, pathes[0]);
            await bot.ProcessIncomingMessageAsync(body, proc);

            return("", "text/plain");
        }
Beispiel #3
0
        protected override async Task Handle(IHandleContext context, SendMessageMessage message)
        {
            var bot = await botManager.GetBotAsync(message.BotEngine, message.BotKey);

            await bot.SendMessageAsync(new ChatSession(message.ChatId), message.Message.Message);
        }