From b595712d7bca4af727cf0438e62d56e0a3e4bb01 Mon Sep 17 00:00:00 2001 From: TroyHernandez Date: Thu, 14 May 2026 16:21:42 -0500 Subject: [PATCH] README: add mx_room_create example The Quick Start shows mx_room_join but never demonstrates creating a new room with invites. Add a short example between the Quick Start and the What's Covered table. --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 43fa996..edaf1b7 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,22 @@ str(batch$rooms$join) mx_logout(s) ``` +## Create a private room with invites + +```r +room <- mx_room_create( + s, + name = "project sync", + topic = "weekly check-in", + preset = "private_chat", + invite = c("@bob:matrix.example", "@carol:matrix.example") +) +mx_send(s, room, "kickoff in 5") +``` + +`mx_room_create` returns the new room id as a character string. +Presets: `"private_chat"`, `"trusted_private_chat"`, `"public_chat"`. + ## What's covered | Area | Functions |