Slack v0.9.2 Slack.Web.Mpim

Summary

Functions

Closes a multiparty direct message channel

Fetches history of messages and events from a multiparty direct message

Lists multiparty direct message channels for the calling user

Sets the read cursor in a multiparty direct message channel

This method opens a multiparty direct message

Functions

close(channel, optional_params \\ %{})

Closes a multiparty direct message channel.

Required Params

  • channel - MPIM to close.

Errors the API can return:

  • channel_not_found - Value passed for channel was invalid.
history(channel, optional_params \\ %{})

Fetches history of messages and events from a multiparty direct message.

Required Params

  • channel - Multiparty direct message to fetch history for.

Optional Params

  • count - Number of messages to return, between 1 and 1000. ex: 100
  • inclusive - Include messages with latest or oldest timestamp in results. ex: 1
  • latest - End of time range of messages to include in results.
  • oldest - Start of time range of messages to include in results.
  • unreads - Include unread_count_display in the output? ex: 1

Errors the API can return:

  • channel_not_found - Value passed for channel was invalid.
  • invalid_ts_latest - Value passed for latest was invalid
  • invalid_ts_oldest - Value passed for oldest was invalid
list(optional_params \\ %{})

Lists multiparty direct message channels for the calling user.

mark(channel, ts, optional_params \\ %{})

Sets the read cursor in a multiparty direct message channel.

Required Params

  • channel - multiparty direct message channel to set reading cursor in.
  • ts - Timestamp of the most recently seen message.

Errors the API can return:

  • channel_not_found - Value passed for channel was invalid.
  • invalid_timestamp - Value passed for timestamp was invalid.
open(users, optional_params \\ %{})

This method opens a multiparty direct message.

Required Params

  • users - Comma separated lists of users. The ordering of the users is preserved whenever a MPIM group is returned.

Errors the API can return:

  • not_enough_users - Needs at least 2 users to open
  • too_many_users - Needs at most 8 users to open
  • users_list_not_supplied - Missing users in request