1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00

update protocol id

This commit is contained in:
lizheng.lz1998 2021-12-08 00:45:06 +08:00
parent 2d17133a7b
commit 59471c51cf
2 changed files with 9 additions and 6 deletions

View File

@ -348,11 +348,12 @@ const (
Administrator MemberPermission = 2
Member MemberPermission = 3
Unset ClientProtocol = 0
AndroidPhone ClientProtocol = 1
IPad ClientProtocol = 2
AndroidWatch ClientProtocol = 3
MacOS ClientProtocol = 4
QiDian ClientProtocol = 5
AndroidWatch ClientProtocol = 2
MacOS ClientProtocol = 3
QiDian ClientProtocol = 4
IPad ClientProtocol = 5
)
func (r *UserJoinGroupRequest) Accept() {

View File

@ -303,8 +303,6 @@ func (info *DeviceInfo) ToJson() []byte {
VendorOSName: string(info.VendorOSName),
Protocol: func() int {
switch info.Protocol {
case IPad:
return 0
case AndroidPhone:
return 1
case AndroidWatch:
@ -313,6 +311,8 @@ func (info *DeviceInfo) ToJson() []byte {
return 3
case QiDian:
return 4
case IPad:
return 5
}
return 0
}(),
@ -377,6 +377,8 @@ func (info *DeviceInfo) ReadJson(d []byte) error {
info.Protocol = MacOS
case 4:
info.Protocol = QiDian
case 5:
info.Protocol = IPad
default:
info.Protocol = IPad
}