From ccae1e330da14d0a8232b8bff03bca960105d197 Mon Sep 17 00:00:00 2001 From: TroyHernandez Date: Mon, 7 Sep 2026 18:37:20 -0500 Subject: [PATCH] Document chat_edit()'s rich argument chat_edit() gained rich alongside chat_send()'s without a @param, and R CMD check has warned about the undocumented argument since. The sibling sentence on chat_send()'s rich also lost its subject: it is chat_capabilities()$rich_markup that adapters ignore it on when empty. --- R/contract.R | 10 ++++++++-- man/chat_edit.Rd | 6 ++++++ man/chat_send.Rd | 5 +++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/R/contract.R b/R/contract.R index 176cb4d..96ad60f 100644 --- a/R/contract.R +++ b/R/contract.R @@ -39,8 +39,9 @@ chat_poll <- function(client, since = NULL, timeout = NULL, ...) { #' adapter-understood alternative (e.g. \code{"notice"}, \code{"emote"}). #' @param rich Adapter-native markup for the platforms that accept it, #' or NULL. Matrix takes an HTML fragment and sends it as -#' \code{formatted_body}; adapters whose -#' \code{chat_capabilities()} is empty ignore it. +#' \code{formatted_body}, Telegram sends it with the HTML parse mode; +#' adapters whose \code{chat_capabilities()$rich_markup} is empty +#' ignore it. #' #' \code{text} is still required and still has to stand on its own. It #' is what a client that cannot render the markup shows, what a push @@ -1024,6 +1025,11 @@ chat_relogin.default <- function(client, ...) { #' apply it. #' @param markup \code{"plain"} or \code{"markdown"}, as #' \code{\link{chat_send}}. +#' @param rich Adapter-native markup for the replacement, as +#' \code{\link{chat_send}}: an HTML fragment where +#' \code{chat_capabilities()$rich_markup} says so, ignored where it is +#' empty. \code{text} is still the whole replacement on its own, for +#' the same reason it is on a send. #' @param kind Message kind, as \code{\link{chat_send}}. Must match what #' the message was sent as: Matrix carries the msgtype inside the #' replacement content, so editing an \code{m.notice} without saying so diff --git a/man/chat_edit.Rd b/man/chat_edit.Rd index 47344dc..7566600 100644 --- a/man/chat_edit.Rd +++ b/man/chat_edit.Rd @@ -30,6 +30,12 @@ apply it.} \item{markup}{\code{"plain"} or \code{"markdown"}, as \code{\link{chat_send}}.} +\item{rich}{Adapter-native markup for the replacement, as +\code{\link{chat_send}}: an HTML fragment where +\code{chat_capabilities()$rich_markup} says so, ignored where it is +empty. \code{text} is still the whole replacement on its own, for +the same reason it is on a send.} + \item{kind}{Message kind, as \code{\link{chat_send}}. Must match what the message was sent as: Matrix carries the msgtype inside the replacement content, so editing an \code{m.notice} without saying so diff --git a/man/chat_send.Rd b/man/chat_send.Rd index fd55434..e68bb5a 100644 --- a/man/chat_send.Rd +++ b/man/chat_send.Rd @@ -47,8 +47,9 @@ supported.} \item{rich}{Adapter-native markup for the platforms that accept it, or NULL. Matrix takes an HTML fragment and sends it as -\code{formatted_body}; adapters whose -\code{chat_capabilities()} is empty ignore it. +\code{formatted_body}, Telegram sends it with the HTML parse mode; +adapters whose \code{chat_capabilities()$rich_markup} is empty +ignore it. \code{text} is still required and still has to stand on its own. It is what a client that cannot render the markup shows, what a push