Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and Default RichContent for UI Rendering Purpose #195

Merged
merged 11 commits into from
Oct 29, 2023

Conversation

ywang1110
Copy link

No description provided.

public string? Payload { get; set; }
[JsonPropertyName("image_url")]
public string? ImageUrl { get; set; }
public string? PostBackUrl { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add [JsonPropertyName("postback_url")]?

{
public class Recipient
{
public string? Id { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Id shouldn't be nullable.

{
public class RichContent<T>
{
public Recipient? Recipient { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recipient should be required.

/// RESPONSE
/// </summary>
[JsonPropertyName("messaging_type")]
public string? MessageingType { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is typo, and it's not nullable

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo fixed; I observed that certain components, such as the button template, do not contain the messaging_type field. Refer to the example JSON below. Kindly inform me whether it is still necessary for our custom design."
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can set it as a fixed value messaging_type="RESPONSE" currently.


namespace BotSharp.Abstraction.Messaging.Models.RichContent
{
public class SenderActionModel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename it to SenderActionMessage?

{
public string? Type { get; set; }
public string? Url { get; set; }
public string? Title { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type and Title should be required.

{
public class CommonTemplate<T>
{
public string TemplateType { get; set; } = string.Empty;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JsonPropertyName("template_type")]

{
public class TextMessage
{
public string? Text { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not nullable.

@Oceania2018
Copy link
Member

image

@Oceania2018 Oceania2018 merged commit 2146f6e into SciSharp:master Oct 29, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants