GitHub

SlackPostOptions

API reference for SlackPostOptions.

Slack options for every write inside an effect; None leaves a field as the enclosing options set it.

  • notify_users, notify_groups and notify_broadcast: which mention tokens may notify. Default: none.
  • unfurl: link and media previews on post. Default false, which sends unfurl_links and unfurl_media both false. chat.update has no unfurl parameter, and Slack disables unfurling in a stream.
  • native_stream: default true where the workspace supports it.
  • recipient_team_id: for a Connect channel, where the recipient is on another team.
  • session_status_at_end: the agent session status at a normal end of a native stream. Default "active".

Attributes

AttributeTypeDescription
notify_usersSequence[str] | None = None
notify_groupsSequence[str] | None = None
notify_broadcastbool | None = None
unfurlbool | None = None
native_streambool | None = None
recipient_team_idstr | None = None
session_status_at_endSessionStatus | None = None
notifyNotify

Who a post may notify.

Functions

__init__

__init__(*, notify_users=None, notify_groups=None, notify_broadcast=None, unfurl=None, native_stream=None, recipient_team_id=None, session_status_at_end=None) -> None
ParameterTypeDescription
notify_usersSequence[str] | None = None
notify_groupsSequence[str] | None = None
notify_broadcastbool | None = None
unfurlbool | None = None
native_streambool | None = None
recipient_team_idstr | None = None
session_status_at_endSessionStatus | None = None

merge

merge(inner) -> SlackPostOptions

These options with inner's set fields winning.

ParameterTypeDescription
innerSlackPostOptions

Returns SlackPostOptions

def merge(self, inner: SlackPostOptions) -> SlackPostOptions:
    """These options with ``inner``'s set fields winning."""
    changes: dict[str, object] = {
        field.name: value
        for field in fields(inner)
        if (value := getattr(inner, field.name)) is not None
    }
    return replace(self, **changes)