Update to slack_api v0.17.0
Update to slack_api v0.16.1
Thanks to https://github.com/compressed this release has a large amount of important fixes and breaking changes.
- Updates to support new
slack-api
version and remove dependencies on openssl0.7.x
and hyper0.9.x
.
- Replaced
websocket
withtungstenite
. This change moves fromopenssl
tonative-tls
. - Updated to
slack-api
version0.16.0
. This changes many of the re-exported types from theslack-api
crate. - Replaced
rustc_serialize
withserde
. This change was needed because the newslack-api
usesserde
. - Replaced
hyper
withreqwest
. - Removed
on_ping
fromEventHander
. Websocket pings are handled internally. EventHander::on_event
passes in theEvent
directly. Any errors are logged using thelog
crate. The raw json string argument has been removed.- Removed
WsMessage::Ping
variant. - Removed
Error
variants:Error::JsonDecode
andError::JsonEncode
. - All
Sender
related functions have been moved directly toSender
.RtmClient::Client::sender()
gives a reference to theSender
. - The following
RtmClient
functions have been removed:post_message
,update_message
,delete_message
mark
set_topic
set_purpose
add_reaction
replacesadd_reaction_file
andadd_reaction_file_comment
im_open
,im_close
,im_history
,im_list
,im_mark
channels_history
get_name
get_id
- Some
Event
variants are now inside aBox
for performance reasons (see: https://github.com/Manishearth/rust-clippy/wiki#large_enum_variant). Event::MessageSent
andEvent::MessageError
expose new interior structs:MessageSent
andMessageError
respectively.
- Retry receive message on EAGAIN (jwilm) (#61)
- Change type signatures of handlers to take Event instead of &Event (pinkisemils) (#62)
- Add send typing api and cleanup get_channel_id (vampolo) (#65)
- Add async message sending API thanks to https://github.com/jwilm
- Update dependencies thanks to https://github.com/jgulotta
- Update usage information for example thanks to https://github.com/wezm
- Thanks to https://github.com/squidpickles and https://github.com/dten respectively: add unnoficial events to handle message sending success and error, and add timeout on the rtm sockeckt.
- Two new Events:
MessageSent
andMessageError
- The RtmClient now has a 70 second timeout on the socket. This will be adjusted in the future.
- Thanks to https://github.com/squidpickles handle new reconnect_url events, and rewrite event API to use match instead of if/else branches. Also change dev-dependencies to specific versions to comply with crates.io
- overhaul websocket teardown logic.
- Overhauled event parsing and added Event type, updated the EventHandler api, updated dependencies, added Error::Utf8 for utf8 decoding errors, rustfmt-ed the sources, various bugfixes.
- EventHandler's on_receive is now on_event with a different signature that takes the raw json string as well as the result of parsing the Event, for less library-user parsing and greater flexibility.
- RtmClient's get_outs method has been removed, and the type of the channel used for passing messages between the working threads has changed.
- Bugfix changes the color field of User to
Option<String>
, see: slack-rs#22
- Massive overhaul, implement support for almost all of the bots api, stronger error handling and lots of tests. Thanks a ton to https://github.com/mthjones, see slack-rs#17 for the main overhaul.
Methods that previously returned Result<String,Error>
now return a typed Result<Some_Slack_Response_Type, Error>
:
RtmClient::post_message
now returnsResult<api::chat::PostMessageResponse, Error>
RtmClient::delete_message
now returnsResult<api::chat::DeleteResponse, Error>
RtmClient::mark
now returnsResult<api::channels::MarkResponse, Error>
RtmClient::set_topic
now returnsResult<api::channels::SetTopicResponse, Error>
RtmClient::set_purpose
now returnsResult<api::channels::SetPurposeResponse, Error>
RtmClient::add_reaction_timestamp
now returnsResult<api::reactions::AddResponse, Error>
RtmClient::add_reaction_file
now returnsResult<api::reactions::AddResponse, Error>
RtmClient::add_reaction_file_comment
now returnsResult<api::reactions::AddResponse, Error>
RtmClient::update_message
now returnsResult<api::chat::UpdateResponse, Error>
RtmClient::im_open
now returnsResult<api::im::OpenResponse, Error>
RtmClient::channels_history
now returnsResult<api::channels::HistoryResponse, Error>
RtmClient::im_close
now returnsResult<api::im::CloseResponse, Error>
RtmClient::im_history
now returnsResult<api::im::HistoryResponse, Error>
RtmClient::im_list
now returnsResult<api::im::ListResponse, Error>
RtmClient::im_mark
now returnsResult<api::im::MarkResponse, Error>
Forthcoming releases will see the implementation of the remaining files.upload and some convenient helpers such as a message builder can be expected in a later release, and the Error::Api will expose Slack api error types more strongly in a forthcoming release.
- Add channels_history via https://github.com/jeehoonkang slack-rs#16
- With help from: https://github.com/mthjones, overhaul error handling and refactor, improve api support.
- Introduced slack::error::Error
- Added a number of bots api methods
- Fixed bug where setPurpose called setTopic instead [!]
- Moved example to examples dir thanks to https://github.com/mthjones: slack-rs#9
- Fix slack-rs#8
- Add some web api methods, add methods to map names to ids.
- TODO: expect the error type overhaul to be pushed back to 0.9.X
- RtmClient::new now takes the bot token/api_key and login, login_and_run do not.
- Bugfix via https://github.com/Farthen: slack-rs#6
- Cleaned up the api and json handling.
- TODO: expect better error handling in 0.8.X
- 'MessageHandler' is now 'EventHandler' and all of the slack data structs have been updated to match the api as closely as possible.
- Updated to stable rust.