github slack-go/slack v0.21.1

10 hours ago

v0.21.1

Added

  • MessageEvent channel type helpers — New ChannelTypeChannel, ChannelTypeGroup,
    ChannelTypeIM, and ChannelTypeMPIM constants plus IsChannel(), IsGroup(), IsIM(), and
    IsMpIM() convenience methods on MessageEvent. No more comparing raw strings to figure out where a
    message came from:
if ev.IsIM() {
    // handle direct message
}

Fixed

  • MessageEvent doc typo — ChannelType documentation listed "mim" instead of the correct "mpim".
  • Duplicate attachment/block serialization — MsgOptionAttachments and MsgOptionBlocks were serializing
    payloads twice (once for the response-URL JSON path, once for the form POST path). Serialization now
    happens once inside formSender.BuildRequestContext. (#1547)

Note

UnsafeApplyMsgOptions no longer includes attachments/blocks keys in the returned values, since marshalling is deferred to send time. This function is documented as unsupported.

Don't miss a new slack release

NewReleases is sending notifications on new releases.