replace send_file_dm with open_dm resolver (per review)
This commit is contained in:
parent
19f1fa4f28
commit
07941421c1
4 changed files with 26 additions and 44 deletions
|
|
@ -37,15 +37,13 @@ pub enum DaemonRequest {
|
|||
caption: Option<String>,
|
||||
},
|
||||
|
||||
/// Open (or reuse) a DM with `user_id` and post a local file as an
|
||||
/// attachment. `caption`, when set, is sent as a follow-up text
|
||||
/// message in the DM.
|
||||
#[serde(rename = "send_file_dm")]
|
||||
SendFileDm {
|
||||
user_id: String,
|
||||
path: String,
|
||||
caption: Option<String>,
|
||||
},
|
||||
/// Resolve (find-or-create) the DM room with `user_id` and return
|
||||
/// its room id, without sending anything. Lets a caller obtain the
|
||||
/// DM room id and then use the room-based tools (`send_file`,
|
||||
/// `send_message`, …) against it — so there is no per-tool `_dm`
|
||||
/// variant.
|
||||
#[serde(rename = "open_dm")]
|
||||
OpenDm { user_id: String },
|
||||
|
||||
/// React to a specific event with an emoji `key`. Matrix-spec
|
||||
/// `m.reaction` annotation.
|
||||
|
|
|
|||
Loading…
Reference in a new issue