Releases: soxtoby/SlackNet
v0.15.1
v0.15.0
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
- 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 madeOpen
async. - Deprecated
SlackEndpointConfiguration.SocketModeConnectionOptions
setter - the options should be passed intoUseSocketMode
instead.
v0.13.3
- 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
v0.13.1
- Support for new file upload APIs
- Added
GetUploadUrlExternal
andCompleteUploadExternal
methods toFilesApi
. - 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 toFilesApi
constructor. The old constructor has been marked as obsolete, and will use the defaultIHttp
implementation.
- Added
- Added missing
StatusEmojiDisplayInfo
,StatusTextCanonical
,Pronouns
, andStartDate
properties toUserProfile
. - Added
ThreadBroadcast
event. This replacesReplyBroadcast
, 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
- Added
RichTextList.Offset
property. - Added
RichTextQuote.Border
property. - Added
RichTextPreformatted.Border
property. - Added
Highlight
,ClientHighlight
, andUnlink
properties toRichTextStyle
. RichTextStyle
properties aren't serialized if they're false.
Breaking changes
RichTextList.Elements
only acceptsRichTextSection
s.RichTextList.Style
changed from a string toRichTextListStyle
enum.