/// <summary> /// Get sender classification flags. /// </summary> public static SenderClassification GetSenderClassification(this BotRoutingContext context) { var result = SenderClassification.None; if (context.IsFromBot()) { result |= SenderClassification.Bot; } if (context.IsFromRealPerson()) { result |= SenderClassification.User; } if (context.IsFromAdmin()) { result |= SenderClassification.Admin; } return(result); }
/// <summary> /// Checks if the sender is a real person. /// </summary> public static bool IsFromRealPerson(this BotRoutingContext context) => !context.IsFromBot();