config: renamed common.hosts_dict to common.hosts and improved its description
This commit is contained in:
parent
f4ca8c52cc
commit
42df19195d
2 changed files with 10 additions and 3 deletions
|
|
@ -1056,7 +1056,7 @@ class SatXMPPClient(SatXMPPEntity, core_types.SatXMPPClient, wokkel_client.XMPPC
|
|||
# for now we consider Android devices to be always phones
|
||||
self.identities = [disco.DiscoIdentity("client", "phone", C.APP_NAME)]
|
||||
|
||||
hosts_map = G.config.common.hosts_dict
|
||||
hosts_map = G.config.common.hosts
|
||||
if host is None and user_jid.host in hosts_map:
|
||||
host_data = hosts_map[user_jid.host]
|
||||
if isinstance(host_data, str):
|
||||
|
|
|
|||
|
|
@ -300,8 +300,15 @@ class CommonSettings(ConfigOptions):
|
|||
pubsub_cache_strategy: Literal["no_cache"] | None = Field(
|
||||
default=None, description="PubSub cache strategy"
|
||||
)
|
||||
hosts_dict: dict[str, dict] = Field(
|
||||
default_factory=dict, description="Dictionary of host configurations"
|
||||
hosts: dict[str, dict | str] = Field(
|
||||
default_factory=dict,
|
||||
description=(
|
||||
"Mapping of XMPP domains to their connection host (hostname or IP) and port. "
|
||||
" Allows overriding the connection target for specific domains. Each entry"
|
||||
" can be either a string (host only) or a dictionary with 'host' and 'port'"
|
||||
" keys. Example: {'example.com': 'backend.example.com'} or {'example.com':"
|
||||
" {'host': '192.168.1.100', 'port': 5222}}"
|
||||
),
|
||||
)
|
||||
ack_timeout: int = Field(
|
||||
default=35,
|
||||
|
|
|
|||
Loading…
Reference in a new issue