use background_jobs::QueueHandle;
use lemmy_db_schema::{source::secret::Secret, DbPool};
use lemmy_utils::{settings::structs::Settings, LemmyError};
-use reqwest::Client;
+use reqwest_middleware::ClientWithMiddleware;
use serde::Serialize;
pub mod chat_server;
pub struct LemmyContext {
pool: DbPool,
chat_server: Addr<ChatServer>,
- client: Client,
+ client: ClientWithMiddleware,
activity_queue: QueueHandle,
settings: Settings,
secret: Secret,
pub fn create(
pool: DbPool,
chat_server: Addr<ChatServer>,
- client: Client,
+ client: ClientWithMiddleware,
activity_queue: QueueHandle,
settings: Settings,
secret: Secret,
pub fn chat_server(&self) -> &Addr<ChatServer> {
&self.chat_server
}
- pub fn client(&self) -> &Client {
+ pub fn client(&self) -> &ClientWithMiddleware {
&self.client
}
pub fn activity_queue(&self) -> &QueueHandle {