Implement Realm joining (#193)
* Pass client options to ping * Implement RealmAPI to auth * Add Realm join example * Update package.json * Update README.md * Update index.d.ts * Show one option, remove listener * Fix wording * Explain options * Optional fields * Fix typo * Moved retry ad host/port extraction to prealms * Add docs * Fix lint * Depend on prealms release Co-authored-by: LucienHH <Lucien.holloway@aprox.co.uk>
This commit is contained in:
parent
dfff13867d
commit
cde600d51e
7 changed files with 88 additions and 3 deletions
|
|
@ -15,7 +15,7 @@ function createClient (options) {
|
|||
if (options.skipPing) {
|
||||
client.init()
|
||||
} else {
|
||||
ping(options).then(ad => {
|
||||
ping(client.options).then(ad => {
|
||||
const adVersion = ad.version?.split('.').slice(0, 3).join('.') // Only 3 version units
|
||||
client.options.version = options.version ?? (Options.Versions[adVersion] ? adVersion : Options.CURRENT_VERSION)
|
||||
client.conLog?.(`Connecting to server ${ad.motd} (${ad.name}), version ${ad.version}`, client.options.version !== ad.version ? ` (as ${client.options.version})` : '')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue