Skip to content

Commit

Permalink
Fix verification of api.version response
Browse files Browse the repository at this point in the history
  • Loading branch information
chipsenkbeil committed Jul 14, 2023
1 parent 479e40c commit 58417e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/distant-core/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ local function verify_version(payload)
return (
payload.type == 'version'
and type(payload.server_version) == 'string'
and type(payload.protocol_version) == 'table'
and type(payload.protocol_version) == 'string'
and type(payload.capabilities) == 'table'
)
end
Expand Down Expand Up @@ -895,7 +895,7 @@ end

--- @class distant.core.api.VersionPayload
--- @field server_version string
--- @field protocol_version {[1]: integer, [2]: integer, [3]: integer}
--- @field protocol_version string
--- @field capabilities string[]

--- @alias distant.core.api.VersionOpts {timeout?:number, interval?:number}
Expand Down

0 comments on commit 58417e9

Please sign in to comment.