diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-07 16:12:25 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-07 16:12:25 +0800 |
commit | 799927b8b97429a29455713564fafcbf43f277c8 (patch) | |
tree | 8fcf6abf9d5da206a4b4a9880d32b428ff564cc2 /script/service/telemetry.lua | |
parent | bcaf47b66a81e56f85e8fa48021da10062899425 (diff) | |
download | lua-language-server-799927b8b97429a29455713564fafcbf43f277c8.zip |
telemetry version
Diffstat (limited to 'script/service/telemetry.lua')
-rw-r--r-- | script/service/telemetry.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/script/service/telemetry.lua b/script/service/telemetry.lua index 419589e7..978adee4 100644 --- a/script/service/telemetry.lua +++ b/script/service/telemetry.lua @@ -9,6 +9,7 @@ local proto = require 'proto.proto' local lang = require 'language' local define = require 'proto.define' local await = require 'await' +local version = require 'version' local tokenPath = (ROOT / 'log' / 'token'):string() local token = util.loadFile(tokenPath) @@ -49,6 +50,14 @@ local function pushPlatformInfo(link) )) end +local function pushVersion(link) + send(link, string.pack('zzz' + , 'version' + , token + , version.getVersion() + )) +end + local function pushErrorLog(link) if not log.firstError then return @@ -78,6 +87,7 @@ timer.wait(5, function () function link:on_connect() pushClientInfo(link) pushPlatformInfo(link) + pushVersion(link) pushErrorLog(link) self:close() end |