Skip to content

Commit

Permalink
Adding some missing properties to RichTextBlock and Attachment
Browse files Browse the repository at this point in the history
  • Loading branch information
soxtoby committed Jul 22, 2023
1 parent d44f89e commit bb684de
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions SlackNet/Blocks/RichTextBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class RichTextLink : RichTextSectionElement
public string Url { get; set; }
public string Text { get; set; }
public RichTextStyle Style { get; set; } = new();
public bool? Unsafe { get; set; }
}

[SlackType("team")]
Expand Down
2 changes: 2 additions & 0 deletions SlackNet/Interaction/AttachmentUpdateResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class AttachmentUpdateResponse : IReadOnlyAttachment
public IList<Field> Fields => Attachment.Fields;
public string ImageUrl => Attachment.ImageUrl;
public string ThumbUrl => Attachment.ThumbUrl;
public int? ThumbWidth => Attachment.ThumbWidth;
public int? ThumbHeight => Attachment.ThumbHeight;
public string FromUrl => Attachment.FromUrl;
public string Footer => Attachment.Footer;
public string FooterIcon => Attachment.FooterIcon;
Expand Down
11 changes: 9 additions & 2 deletions SlackNet/Objects/Attachment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public interface IReadOnlyAttachment
IList<Field> Fields { get; }
string ImageUrl { get; }
string ThumbUrl { get; }
int? ThumbWidth { get; }
int? ThumbHeight { get; }
string FromUrl { get; }
string Footer { get; }
string FooterIcon { get; }
Expand Down Expand Up @@ -64,7 +66,10 @@ public class Attachment : IReadOnlyAttachment
public IList<Field> Fields { get; set; } = new List<Field>();
public string ImageUrl { get; set; }
public string ThumbUrl { get; set; }
public int? ThumbWidth { get; set; }
public int? ThumbHeight { get; set; }
public string FromUrl { get; set; }
public string OriginalUrl { get; set; }
public string Footer { get; set; }
public string FooterIcon { get; set; }
public string Ts { get; set; }
Expand All @@ -78,6 +83,8 @@ public class Attachment : IReadOnlyAttachment
public string ChannelName { get; set; }
public bool? IsShare { get; set; }
public bool? IsMsgUnfurl { get; set; }
public string ServiceName { get; set; }
public string ServiceIcon { get; set; }
}

public class MessageBlock
Expand All @@ -88,7 +95,7 @@ public class MessageBlock
public MessageBlocks Message { get; set; }
}

public class MessageBlocks
public class MessageBlocks
{
public IList<Block> Blocks { get; set; }
}
}

0 comments on commit bb684de

Please sign in to comment.