-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
The shortcoming you see
Synapse v1.141.0+ now has stable support for device masquerading. I'd like to submit a PR to add similar support for ruma-client.
The improvement
My initial thought would be to modify send_request_as from:
pub async fn send_request_as<R: OutgoingRequest>(
&self,
user_id: &UserId,
request: R,
) -> ResponseResult<C, R> {
self.send_customized_request(request, add_user_id_to_query::<C, R>(user_id)).await
}
to:
pub async fn send_request_as<R: OutgoingRequest>(
&self,
user_id: Option<&UserId>,
device_id: Option<&DeviceId>,
request: R,
) -> ResponseResult<C, R> {
self.send_customized_request(request, add_ids_to_query::<C, R>(user_id, device_id)).await
}
I would also similarly change the send_matrix_request_as signature.
Is that acceptable? Or should I avoid breaking changes by creating independent functions for user and/or device masquearding?
Metadata
Metadata
Assignees
Labels
No labels