From 0e08ceccdda970d10dfd87cb78a8807a359f459c Mon Sep 17 00:00:00 2001 From: Mrs4s Date: Wed, 7 Dec 2022 03:27:19 +0800 Subject: [PATCH] api: get_version_info remove `protocol` field & add `protocol_name` field --- coolq/api.go | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/coolq/api.go b/coolq/api.go index d7275ce..9941fe1 100644 --- a/coolq/api.go +++ b/coolq/api.go @@ -1990,22 +1990,7 @@ func (bot *CQBot) CQGetVersionInfo() global.MSG { "runtime_version": runtime.Version(), "runtime_os": runtime.GOOS, "version": base.Version, - "protocol": func() int { - switch client.SystemDeviceInfo.Protocol { - case client.Unset, client.IPad: - return 0 - case client.AndroidPhone: - return 1 - case client.AndroidWatch: - return 2 - case client.MacOS: - return 3 - case client.QiDian: - return 4 - default: - return -1 - } - }(), + "protocol_name": client.SystemDeviceInfo.Protocol, }) }