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

Merge pull request #214 from lz1998/protocol

update protocol id
This commit is contained in:
Mrs4s 2021-12-17 17:48:30 +08:00 committed by GitHub
commit 10bac416ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -343,11 +343,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

@ -301,8 +301,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:
@ -311,6 +309,8 @@ func (info *DeviceInfo) ToJson() []byte {
return 3
case QiDian:
return 4
case IPad:
return 5
}
return 0
}(),
@ -375,6 +375,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
}