Commit 4963b25ab8
Unregistered key
Layout: unified · split
docs/iamb.1 +2
| @@ -160,6 +160,8 @@ Send an invitation to a user to join the currently focused room. | ||
| 160 | 160 | Join the focused preview room. |
| 161 | 161 | .It Sy ":join [room]" |
| 162 | 162 | Join a room or open it if you are already joined. |
| 163 | This accepts a room id, room alias, user id, matrix uri, or matrix.to link. | |
| 164 | If the argument refers to a user, a dm room with them is opened/created. | |
| 163 | 165 | .It Sy ":knock" |
| 164 | 166 | Request to join the focused preview room. |
| 165 | 167 | .It Sy ":knock accept [user]" |
src/windows/mod.rs +7 −2
| @@ -21,6 +21,7 @@ use modalkit_ratatui::list::{List, ListCursor, ListItem, ListState}; | ||
| 21 | 21 | |
| 22 | 22 | use crate::base::{RoomNeeds, SortColumn, SortFieldRoom, SortFieldUser, SortOrder, UnreadInfo}; |
| 23 | 23 | use crate::prelude::*; |
| 24 | use crate::resolve_mxid; | |
| 24 | 25 | use crate::windows::room::{RoomState, room_command}; |
| 25 | 26 | use crate::windows::verify::VerifyItem; |
| 26 | 27 | use crate::windows::welcome::WelcomeState; |
| @@ -1050,9 +1051,13 @@ impl Window<IambInfo> for IambWindow { | ||
| 1050 | 1051 | } else { |
| 1051 | 1052 | store.application.worker.create_dm(user_id.to_owned())?.into() |
| 1052 | 1053 | } |
| 1054 | } else if let Ok(uri) = MatrixUri::parse(name.as_str()) { | |
| 1055 | let id = resolve_mxid(store, uri.id().to_owned(), uri.via().to_owned())?; | |
| 1056 | return IambWindow::open(id, store); | |
| 1057 | } else if let Ok(uri) = MatrixToUri::parse(name.as_str()) { | |
| 1058 | let id = resolve_mxid(store, uri.id().to_owned(), uri.via().to_owned())?; | |
| 1059 | return IambWindow::open(id, store); | |
| 1053 | 1060 | } else { |
| 1054 | // XXX: support passing matrix uris to `:join` | |
| 1055 | ||
| 1056 | 1061 | return Err(UIError::Failure("Could not parse room identifier".to_string())); |
| 1057 | 1062 | }; |
| 1058 | 1063 | |