Skip to contents

MattermostR 0.2.0

New functions

Messaging

Posts, reactions & pins

Channels

Users

Improvements

  • Thread replies: send_mattermost_message() gains a root_id parameter for posting into threads.
  • Message priority: priority is now passed under metadata$priority (the correct API location). Valid values are "Normal" (default), "Important", and "Urgent". The old undocumented "High" / "Low" values have been removed.
  • send_mattermost_file() now delegates to mattermost_api_request() with multipart = TRUE, gaining retry/backoff, error handling, and verbose support.
  • Rate limiting: proactive throttling at 10 req/s via req_throttle(). Reactive 429 handling reads X-Ratelimit-Reset for precise wait timing. Override with options(MattermostR.rate_limit = Inf).
  • Structured error conditions: HTTP errors now raise a mattermost_error S3 condition. Set options(MattermostR.on_error = "message") for legacy NULL-return behaviour.
  • get_default_auth() and authenticate_mattermost() now resolve credentials from environment variables (MATTERMOST_TOKEN, MATTERMOST_URL) before R options, in both functions.
  • authenticate_mattermost() gains cache_credentials = FALSE to prevent storing the token in options(). clear_mattermost_credentials() wipes cached credentials.
  • print.mattermost_auth() masks the bearer token in console output.
  • paginate_api() internal helper auto-paginates any GET endpoint that supports page/per_page. Used by get_all_teams(), get_team_channels(), and post-retrieval.
  • get_user_info() is now deprecated in favour of get_user() (emits a lifecycle warning).
  • get_me() now defaults to verbose = FALSE, consistent with all other functions.
  • check_not_null() rewritten to handle vector inputs safely.

Bug fixes

  • Username/password login rewritten to use httr2 directly, fixing broken authentication flow.
  • get_channel_posts() previously returned only the first page; now fully paginated.

MattermostR 0.1.0