public static void ExecuteOn_Up_Through_Receive(XComponent.ChatManager.UserObject.PublishedMessage publishedMessage, XComponent.ChatterBot.UserObject.ChatterBot chatterBot, object object_InternalMember, RuntimeContext context, IReceivePublishedMessageOnUpChatterBotSenderInterface sender) { if (publishedMessage.Message.Contains(chatterBot.Name)) { TriggeredMethodContext.Instance.GetDefaultLogger().Info($"Message from {publishedMessage.User} in room {publishedMessage.Room} received"); SendMessage($"Hello {publishedMessage.User}!", chatterBot, context, sender.Send); } }
public static void ExecuteOn_Up_Through_MessageReceived(XComponent.ChatManager.UserObject.PublishedMessage publishedMessage, XComponent.HistoryManager.UserObject.PublishedHistory publishedHistory, object object_InternalMember, RuntimeContext context, IMessageReceivedPublishedMessageOnUpHistoryManagerSenderInterface sender) { // Notice: No concurrency here, thanks to our bus + akka core. publishedHistory.Messages.Add(publishedMessage); }