Skip to content

Commit

Permalink
Merge pull request Mrs4s#214 from lz1998/protocol
Browse files Browse the repository at this point in the history
update protocol id
  • Loading branch information
Mrs4s authored Dec 17, 2021
2 parents dc66c61 + 59471c5 commit 10bac41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions client/entities.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 4 additions & 2 deletions client/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -311,6 +309,8 @@ func (info *DeviceInfo) ToJson() []byte {
return 3
case QiDian:
return 4
case IPad:
return 5
}
return 0
}(),
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 10bac41

Please sign in to comment.