private ComposeExtensionResponse GetComposeExtensionResponse(Activity activity)
        {
            var composeExtensionQuery = activity.GetComposeExtensionQueryData();
            var composeExtParamValue  = composeExtensionQuery.Parameters[0].Value.ToString();
            // Process data and return the response.
            ComposeExtensionResponse          composeExtensionResponse      = new ComposeExtensionResponse();
            ComposeExtensionResult            composeExtensionResult        = new ComposeExtensionResult();
            List <ComposeExtensionAttachment> lstComposeExtensionAttachment = new List <ComposeExtensionAttachment>();
            string imageUrl    = "https://luna1.co/cae4f2.png";
            string deepLinkUrl = TemplateUtility.GetDeepLink(activity, composeExtParamValue);

            lstComposeExtensionAttachment.Add(TemplateUtility.GenerateComposeExtentionAttachments(activity));
            composeExtensionResult.Type               = "result";
            composeExtensionResult.AttachmentLayout   = "list";
            composeExtensionResult.Attachments        = lstComposeExtensionAttachment;
            composeExtensionResponse.ComposeExtension = composeExtensionResult;
            return(composeExtensionResponse);
        }
Пример #2
0
        private ComposeExtensionResponse GetComposeExtensionResponse(Activity activity)
        {
            var composeExtensionQuery = activity.GetComposeExtensionQueryData();
            var composeExtParamValue  = composeExtensionQuery.Parameters[0].Value.ToString();
            // Process data and return the response.
            ComposeExtensionResponse          composeExtensionResponse      = new ComposeExtensionResponse();
            ComposeExtensionResult            composeExtensionResult        = new ComposeExtensionResult();
            List <ComposeExtensionAttachment> lstComposeExtensionAttachment = new List <ComposeExtensionAttachment>();
            string imageUrl    = "https://luna1.co/cae4f2.png";
            string deepLinkUrl = TemplateUtility.GetDeepLink(activity, composeExtParamValue);

            lstComposeExtensionAttachment.Add(TemplateUtility.CreateComposeExtensionCardsAttachments("Deep Link", "Clicking on the button will redirect you to the configuration tab", imageUrl, "hero", deepLinkUrl));
            composeExtensionResult.Type               = "result";
            composeExtensionResult.AttachmentLayout   = "list";
            composeExtensionResult.Attachments        = lstComposeExtensionAttachment;
            composeExtensionResponse.ComposeExtension = composeExtensionResult;
            return(composeExtensionResponse);
        }