Changing messageloop behaviour and fix missing Device instance in UpdateResult

- simplified for future changes
This commit is contained in:
Florian Zevedei
2024-01-24 21:47:14 +01:00
parent 07fe8e9074
commit c821a69d57
2 changed files with 8 additions and 3 deletions
@@ -22,7 +22,7 @@ namespace DemoBot
public ExternalActionManager ExternalActionManager { get; set; }
public async Task MessageLoop(BotBase bot, DeviceSession session, UpdateResult ur, MessageResult mr)
public async Task MessageLoop(BotBase bot, DeviceSession s, UpdateResult ur, MessageResult mr)
{
var update = ur.RawData;
@@ -34,6 +34,9 @@ namespace DemoBot
return;
}
//Remove unecessary parameter from method call in the future
var session = ur.Device;
//Is this a bot command ?
if (mr.IsFirstHandler && mr.IsBotCommand && bot.IsKnownBotCommand(mr.BotCommand))
{