ruma_client_api/profile/
delete_profile_field.rs1pub mod v3 {
6 use ruma_common::{
11 OwnedUserId,
12 api::{auth_scheme::AccessToken, request, response},
13 metadata,
14 profile::ProfileFieldName,
15 };
16
17 #[cfg(feature = "unstable-msc4466")]
18 use crate::profile::PropagateTo;
19
20 metadata! {
21 method: DELETE,
22 rate_limited: true,
23 authentication: AccessToken,
24 history: {
25 unstable("uk.tcpip.msc4133") => "/_matrix/client/unstable/uk.tcpip.msc4133/profile/{user_id}/{field}",
26 1.16 => "/_matrix/client/v3/profile/{user_id}/{field}",
27 }
28 }
29
30 #[request]
32 pub struct Request {
33 #[ruma_api(path)]
35 pub user_id: OwnedUserId,
36
37 #[ruma_api(path)]
39 pub field: ProfileFieldName,
40
41 #[cfg(feature = "unstable-msc4466")]
43 #[ruma_api(query)]
44 #[serde(rename = "computer.gingershaped.msc4466.propagate_to")]
45 #[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
46 pub propagate_to: PropagateTo,
47 }
48
49 impl Request {
50 pub fn new(user_id: OwnedUserId, field: ProfileFieldName) -> Self {
52 Self {
53 user_id,
54 field,
55 #[cfg(feature = "unstable-msc4466")]
56 propagate_to: PropagateTo::default(),
57 }
58 }
59 }
60
61 #[response]
63 #[derive(Default)]
64 pub struct Response {}
65
66 impl Response {
67 pub fn new() -> Self {
69 Self {}
70 }
71 }
72}