Skip to content

Releases: soxtoby/SlackNet

v0.15.1

02 Nov 23:06
Compare
Choose a tag to compare
  • Added microseconds to DateTimes produced by the ToDateTime helper. This makes sorting messages by timestamp more reliable, but Ts strings should still be used to identify messages, rather than using DateTimes.

v0.15.0

12 Oct 01:46
Compare
Choose a tag to compare

Breaking changes

CancellationToken parameters are no longer nullable. They're still optional, so this should only affect code that was explicitly using CancellationToken?.

If you were previously passing in a nullable CancellationToken, I'd recommend null-coalescing to either default or CancellationToken.None.

If you were specifying the type in testing mocks, e.g. with Arg.Any<CancellationToken?>() or It.IsAny<CancellationToken?>(), simply remove the ?. If you were passing in null in tests, replace it with default or CancellationToken.None. If you were asserting that null was passed in as the cancellation token, it should be fine to assert on CancellationToken.None instead.

v0.14.0

25 Sep 03:23
Compare
Choose a tag to compare
  • Socket mode client (and RTM client) retry initial connection unless Slack returns an error response.
  • Improved logging around web socket connections.
  • UseSocketMode properly disconnects the socket mode client when app is shut down.
  • Rate-limited API request retries are cancelled immediately when cancellation is requested.

Breaking changes

  • SlackNet.AspNetCore now depends on Microsoft.Extensions.Hosting.Abstractions.
  • Deprecated Utils.RetryWithDelay - this was never meant to be public.
  • Simplified IWebSocket interface and made Open async.
  • Deprecated SlackEndpointConfiguration.SocketModeConnectionOptions setter - the options should be passed into UseSocketMode instead.

v0.13.3

31 Aug 01:21
Compare
Choose a tag to compare
  • Updating some dependencies to avoid vulnerable packages:
    • SlackNet now depends on System.Net.Security 4.3.1 and System.Text.RegularExpressions 4.3.1.
    • SlackNet.AspNetCore now depends on System.Text.Encodings.Web 4.5.1.
    • SlackNet.AzureFunctions now depends on Microsoft.Azure.Functions.Worker.Core 1.17.0.

v0.13.2

28 Apr 21:28
Compare
Choose a tag to compare
  • Fixed UserProfile deserialization by changing UserProfile.StatusEmojiDisplayInfo to a list.
  • Added Unicode property to EmojiDisplayInfo.

v0.13.1

27 Apr 01:20
Compare
Choose a tag to compare
  • Support for new file upload APIs
    • Added GetUploadUrlExternal and CompleteUploadExternal methods to FilesApi.
    • Added Upload overloads that take advantage of new upload APIs (see below). The old overloads have been marked as obsolete in favour of the new methods.
    • Added IHttp parameter to FilesApi constructor. The old constructor has been marked as obsolete, and will use the default IHttp implementation.
  • Added missing StatusEmojiDisplayInfo, StatusTextCanonical, Pronouns, and StartDate properties to UserProfile.
  • Added ThreadBroadcast event. This replaces ReplyBroadcast, which will now work again, but has been marked as obsolete.

Upload API

Slack's new upload API requires at least 3 requests: 1 to get a URL to upload to, 1 to upload the file to that URL, and 1 to complete the upload operation, and the first 2 of those must be repeated for each file being uploaded together.

SlackNet provides two new Upload methods that handle these requests for you, providing an API similar to the old upload API. These Upload methods take in either a single FileUpload object or an IEnumerable of them, allowing you to specify the file contents in a number of formats, and return references to the uploaded files in Slack. The GetUploadUrlExternal and CompleteUploadExternal methods are provided for completeness, but using Upload is recommended.

v0.13.0

21 Apr 01:47
Compare
Choose a tag to compare
  • Added RichTextList.Offset property.
  • Added RichTextQuote.Border property.
  • Added RichTextPreformatted.Border property.
  • Added Highlight, ClientHighlight, and Unlink properties to RichTextStyle.
  • RichTextStyle properties aren't serialized if they're false.

Breaking changes

  • RichTextList.Elements only accepts RichTextSections.
  • RichTextList.Style changed from a string to RichTextListStyle enum.

v0.12.3

17 Mar 01:42
Compare
Choose a tag to compare
  • Error messages returned from Slack are included in SlackException's message.

v0.12.2

27 Jan 02:22
Compare
Choose a tag to compare
  • Added SlackFile property to Image element and ImageBlock.
  • Added Format property to RichTextDate.
  • Added FileInput block element.

v0.12.1

02 Jan 01:02
Compare
Choose a tag to compare
  • Added experimental option in UseSlackNet to delay responses until after handlers have completed.