@@ -166,6 +166,10 @@ impl ClientBuilder {
166166 /// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
167167 /// [`Self::server_name_or_homeserver_url`].
168168 /// If you set more than one, then whatever was set last will be used.
169+ ///
170+ /// **IMPORTANT:** this method should only be called for the initial
171+ /// authentication. Calls to this method when restoring a previously
172+ /// created session may end up with conflicting data.
169173 pub fn homeserver_url ( mut self , url : impl AsRef < str > ) -> Self {
170174 self . homeserver_cfg = Some ( HomeserverConfig :: HomeserverUrl ( url. as_ref ( ) . to_owned ( ) ) ) ;
171175 self
@@ -180,6 +184,10 @@ impl ClientBuilder {
180184 /// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
181185 /// [`Self::server_name_or_homeserver_url`].
182186 /// If you set more than one, then whatever was set last will be used.
187+ ///
188+ /// **IMPORTANT:** this method should only be called for the initial
189+ /// authentication. Calls to this method when restoring a previously
190+ /// created session may end up with conflicting data.
183191 pub fn server_name ( mut self , server_name : & ServerName ) -> Self {
184192 self . homeserver_cfg = Some ( HomeserverConfig :: ServerName {
185193 server : server_name. to_owned ( ) ,
@@ -197,6 +205,10 @@ impl ClientBuilder {
197205 /// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
198206 /// [`Self::server_name_or_homeserver_url`].
199207 /// If you set more than one, then whatever was set last will be used.
208+ ///
209+ /// **IMPORTANT:** this method should only be called for the initial
210+ /// authentication. Calls to this method when restoring a previously
211+ /// created session may end up with conflicting data.
200212 pub fn insecure_server_name_no_tls ( mut self , server_name : & ServerName ) -> Self {
201213 self . homeserver_cfg = Some ( HomeserverConfig :: ServerName {
202214 server : server_name. to_owned ( ) ,
@@ -215,6 +227,10 @@ impl ClientBuilder {
215227 /// [`Self::server_name`] [`Self::insecure_server_name_no_tls`],
216228 /// [`Self::server_name_or_homeserver_url`].
217229 /// If you set more than one, then whatever was set last will be used.
230+ ///
231+ /// **IMPORTANT:** this method should only be called for the initial
232+ /// authentication. Calls to this method when restoring a previously
233+ /// created session may end up with conflicting data.
218234 pub fn server_name_or_homeserver_url ( mut self , server_name_or_url : impl AsRef < str > ) -> Self {
219235 self . homeserver_cfg = Some ( HomeserverConfig :: ServerNameOrHomeserverUrl (
220236 server_name_or_url. as_ref ( ) . to_owned ( ) ,
0 commit comments