mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +03:00
Fix rename
This commit is contained in:
@@ -4442,12 +4442,12 @@ pub unsafe extern "C" fn dc_accounts_get_next_event(
|
|||||||
#[cfg(feature = "jsonrpc")]
|
#[cfg(feature = "jsonrpc")]
|
||||||
mod jsonrpc {
|
mod jsonrpc {
|
||||||
use super::*;
|
use super::*;
|
||||||
use deltachat_jsonrpc::api::CommandApi;
|
use deltachat_jsonrpc::api::DeltaChatApiV0;
|
||||||
use deltachat_jsonrpc::yerpc::{OutReceiver, RpcClient, RpcSession};
|
use deltachat_jsonrpc::yerpc::{OutReceiver, RpcClient, RpcSession};
|
||||||
|
|
||||||
pub struct dc_jsonrpc_instance_t {
|
pub struct dc_jsonrpc_instance_t {
|
||||||
receiver: OutReceiver,
|
receiver: OutReceiver,
|
||||||
handle: RpcSession<CommandApi>,
|
handle: RpcSession<DeltaChatApiV0>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ mod tests {
|
|||||||
async fn basic_json_rpc_functionality() -> anyhow::Result<()> {
|
async fn basic_json_rpc_functionality() -> anyhow::Result<()> {
|
||||||
let tmp_dir = TempDir::new().unwrap().path().into();
|
let tmp_dir = TempDir::new().unwrap().path().into();
|
||||||
let accounts = Accounts::new(tmp_dir).await?;
|
let accounts = Accounts::new(tmp_dir).await?;
|
||||||
let api = CommandApi::new(accounts);
|
let api = DeltaChatApiV0::new(accounts);
|
||||||
|
|
||||||
let (sender, mut receiver) = unbounded::<String>();
|
let (sender, mut receiver) = unbounded::<String>();
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ mod tests {
|
|||||||
async fn test_batch_set_config() -> anyhow::Result<()> {
|
async fn test_batch_set_config() -> anyhow::Result<()> {
|
||||||
let tmp_dir = TempDir::new().unwrap().path().into();
|
let tmp_dir = TempDir::new().unwrap().path().into();
|
||||||
let accounts = Accounts::new(tmp_dir).await?;
|
let accounts = Accounts::new(tmp_dir).await?;
|
||||||
let api = CommandApi::new(accounts);
|
let api = DeltaChatApiV0::new(accounts);
|
||||||
|
|
||||||
let (sender, mut receiver) = unbounded::<String>();
|
let (sender, mut receiver) = unbounded::<String>();
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ async fn main() -> Result<(), std::io::Error> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handler(ws: WebSocketUpgrade, Extension(api): Extension<CommandApi>) -> Response {
|
async fn handler(ws: WebSocketUpgrade, Extension(api): Extension<DeltaChatApiV0>) -> Response {
|
||||||
let (client, out_receiver) = RpcClient::new();
|
let (client, out_receiver) = RpcClient::new();
|
||||||
let session = RpcSession::new(client.clone(), api.clone());
|
let session = RpcSession::new(client.clone(), api.clone());
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
|
|||||||
Reference in New Issue
Block a user