wampire icon indicating copy to clipboard operation
wampire copied to clipboard

No "options" parameter provided in the client call function

Open boboshan opened this issue 8 months ago • 0 comments

https://github.com/ohyo-io/wampire/blob/a901df4fa4dde4a11770f2ac7caa5ea5bff5a81c/src/client.rs#L1052C12-L1052C12

pub fn call(
    &mut self,
    procedure: URI,
    args: Option<List>,
    kwargs: Option<Dict>,
) -> Pin<Box<dyn Future<Output = Result<(List, Dict), CallError>>>> {
    info!("Calling {:?} with {:?} | {:?}", procedure, args, kwargs);

    let request_id = self.get_next_session_id();

    let (complete, receiver) = oneshot::channel();

    let mut info = self.connection_info.lock().unwrap();

    info.call_requests.insert(request_id, complete);

    info.send_message(Message::Call(
        request_id,
        CallOptions::new(),
        procedure,
        args,
        kwargs,
    ))
    .unwrap();

    Box::pin(async {
        receiver.await.unwrap_or(Err(CallError {
            reason: Reason::InternalError,
            args: None,
            kwargs: None,
        }))
    })
}

Why is there a blank call option in info.send_message() ?

boboshan avatar Oct 24 '23 14:10 boboshan