From 8c353b5b67ac5ea8aa1f673acea3198e553e20c2 Mon Sep 17 00:00:00 2001 From: Lars Weber Date: Tue, 24 Feb 2026 12:44:58 +0100 Subject: [PATCH] feat: add function to overwrite client --- src/client.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/client.rs b/src/client.rs index 506f2fa..c2114db 100644 --- a/src/client.rs +++ b/src/client.rs @@ -118,6 +118,12 @@ impl Mattermost { self } + /// Updates the client that is used for requests + pub fn with_client(mut self, client: Client) -> Self { + self.client = client; + self + } + /// Get a session token from the stored login_id and password. /// Required when using login_id and password authentication, /// before making any calls to the instance API.