v0.21.1
Added
MessageEventchannel type helpers — NewChannelTypeChannel,ChannelTypeGroup,
ChannelTypeIM, andChannelTypeMPIMconstants plusIsChannel(),IsGroup(),IsIM(), and
IsMpIM()convenience methods onMessageEvent. 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.