SimpleX-Chat/docs/rfcs/2022-02-24-servers-configuration.md
Evgeny Poberezkin af471d0077
update github content (#519)
* update github content

* update comparison

* update link

* move message_views.sql to scripts

* move section

* move news section

* typos

Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>

* update readme

* update readme

* update readme

Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
2022-04-11 22:29:08 +01:00

1.6 KiB

Server configuration

  • in agent:
    • Agent.Env.SQLite - move smpServers from AgentConfig to Env, make it TVar; keep "initialSmpServers" in AgentConfig?
    • Agent - getSMPServer to read servers from Env and choose a random server
    • Agent - new functional api - "useServers"
    • Agent.Protocol - new ACommand?
  • chat core:
    • db:
      • new table smp_servers, server per row, same columns as for agent. Have rowid for future
        • getServers method
        • update - truncate and rewrite
    • ChatCommand GetServers - new ChatResponse with list of user SMPServers, it may be empty if default are used
    • ChatCommand SetServers - ChatResponse Ok (restore default servers is empty set servers list)
    • agent config is populated using getServers, if it's empty default are used
  • mobile chat:
    • mobileChatOpts to be populated with initial servers on init (getServers or default if empty)
    • in ui:
      • view in settings
      • GetServers on view open to populate
      • Confirm buttons, Restore button - destructive - clears user servers and default are used
      • validation
        • validation on submit, error with server's string
        • TBD real-time validation
        • fastest is validation on submit without detailed error?
        • maybe even faster - alternatively have 3 fields for entry per server - fingerprint, host, port - and build server strings (still validate to avoid hard crash?)?
  • terminal chat:
    • if -s option is given, these servers are used and getServers is not used for populating agentConfig
    • if -s option is not provided - same as in mobile - getServers or default if empty